Module org.holiday.calendar.western
Class OrthodoxEaster
java.lang.Object
org.holiday.calendar.observance.AbstractObservance
org.holiday.calendar.observance.christian.OrthodoxEaster
- All Implemented Interfaces:
Function<Integer,,LocalDate> Predicate<Integer>,Observance,EasterObservance
Observance of Orthodox Easter as recognized by the Orthodox church.
This class implements the algorithm for Easter calculation as published by
Carl Friedrich Gauss.
Due to the evolution of the computation of Easter Sunday during the early-to-medieval period of the Christian church, this implementation of the Gauss algorithm is only valid for years 530 - 3399 AD.
- Author:
- Dave Joyce
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprotected static final int[][] -
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
-
Field Details
-
MIN_VALID_YEAR
public static final int MIN_VALID_YEAR- See Also:
-
MAX_VALID_YEAR
public static final int MAX_VALID_YEAR- See Also:
-
YEAR_RANGE_ADJUSTMENT_MATRIX
protected static final int[][] YEAR_RANGE_ADJUSTMENT_MATRIX
-
-
Constructor Details
-
OrthodoxEaster
public OrthodoxEaster()
-
-
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
-