Module org.holiday.calendar.western
Class WesternEaster
java.lang.Object
org.holiday.calendar.observance.AbstractObservance
org.holiday.calendar.observance.christian.WesternEaster
- All Implemented Interfaces:
Function<Integer,,LocalDate> Predicate<Integer>,Observance,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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LocalDatecomputeDate(int year) Compute the date for this observance in the given year.protected booleanisValidYear(int year) Determine whether this observance applies in the given year.Methods inherited from class org.holiday.calendar.observance.AbstractObservance
apply, testMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.holiday.calendar.function.Observance
test
-
Constructor Details
-
WesternEaster
public WesternEaster()
-
-
Method Details
-
computeDate
Description copied from class:AbstractObservanceCompute the date for this observance in the given year. Only called whenAbstractObservance.isValidYear(int)returnstrue.- Specified by:
computeDatein classAbstractObservance- Parameters:
year- the year for which to compute the date- Returns:
- computed holiday date
-
isValidYear
protected boolean isValidYear(int year) Description copied from class:AbstractObservanceDetermine whether this observance applies in the given year. Defaults totrue(all years are valid).- Overrides:
isValidYearin classAbstractObservance- Parameters:
year- the year to test- Returns:
trueif this observance applies
-