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

public class WesternEaster extends AbstractObservance implements EasterObservance
Observance of Western Easter as recognized by Roman Catholic and Protestant Christian denominations. This class implements the algorithm for Easter calculation as published by Butcher / Jones / Meeus.

While all Easter dates calculated by this class are Gregorian dates, it does not support a proleptic Gregorian calendar. Dates for years prior to 1583 CE will be calculated the same as Orthodox Easter and simply returned as the Gregorian date.

Author:
Dave Joyce
  • Constructor Details

    • WesternEaster

      public WesternEaster()
  • 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