Class VernalEquinoxDay

java.lang.Object
org.holiday.calendar.observance.AbstractObservance
org.holiday.calendar.observance.jp.VernalEquinoxDay
All Implemented Interfaces:
Function<Integer,LocalDate>, Predicate<Integer>, Observance

public class VernalEquinoxDay extends AbstractObservance
Observance of Vernal Equinox Day (春分の日) — a Japanese national holiday observed on the day of the astronomical vernal equinox in Japan Standard Time.

The exact date (March 20 or 21) is computed using the formula published by the National Astronomical Observatory of Japan (NAOJ) and is valid for years 1980–2099.

  • Constructor Details

    • VernalEquinoxDay

      public VernalEquinoxDay()
  • Method Details

    • computeDate

      protected LocalDate computeDate(int year)
      Description copied from class: AbstractObservance
      Compute the date for this observance in the given year. Only called when AbstractObservance.isValidYear(int) returns true.
      Specified by:
      computeDate in class AbstractObservance
      Parameters:
      year - the year for which to compute the date
      Returns:
      computed holiday date
    • isValidYear

      protected boolean isValidYear(int year)
      Description copied from class: AbstractObservance
      Determine whether this observance applies in the given year. Defaults to true (all years are valid).
      Overrides:
      isValidYear in class AbstractObservance
      Parameters:
      year - the year to test
      Returns:
      true if this observance applies