com.jrefinery.date
Class EasterSundayRule
java.lang.Object
|
+--com.jrefinery.date.AnnualDateRule
|
+--com.jrefinery.date.EasterSundayRule
- All Implemented Interfaces:
- java.lang.Cloneable
- public class EasterSundayRule
- extends AnnualDateRule
- implements java.lang.Cloneable
An annual date rule for Easter (Sunday). The algorithm used here was
obtained from a Calendar FAQ which can be found at:
http://www.tondering.dk/claus/calendar.html.
It is based on an algorithm by Oudin (1940) and quoted in "Explanatory Supplement to the
Astronomical Almanac", P. Kenneth Seidelmann, editor.
- Author:
- DG
Method Summary |
SerialDate |
getDate(int year)
Returns the date of Easter Sunday for the given year. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EasterSundayRule
public EasterSundayRule()
getDate
public SerialDate getDate(int year)
- Returns the date of Easter Sunday for the given year. See the class
description for the source of the algorithm.
This method supports the AnnualDateRule interface.
- Overrides:
getDate
in class AnnualDateRule
- Parameters:
year
- the year to check.- Returns:
- the date of Easter Sunday for the given year.