
The Function Block EASTER_DAYS calculates the number of days between March 21st and Easter Sunday.
Tip: This Function Block can be used instead of EASTER_DATE to determine the Easter date even for years before 1970.
The Easter date was established by the Council of Nicaea in the year 325 as the first Sunday after the first spring full moon following the equinox. It is assumed that the equinox always falls on March 21st, so the calculation reduces to determining the next full moon and the subsequent Sunday. The algorithms used for this were introduced around the year 532 by Dionysius Exiguus. Within the Julian calendar (for years before 1753), a simple cycle of 19 years is used as the basis for determining the lunar phases. In the Gregorian calendar (for years after 1753 - devised by Clavius and Lilius, first introduced by Pope Gregory XIII in October 1582 and adopted by Britain and its colonies in September 1752), two additional correction factors were introduced to increase the accuracy of the calculations.
The input defines the year for calculating the output. If the year is not specified, the current year is used.
Defines the calendar to be used. Only the first character of the input is evaluated. The value "julian" and "J" are interpreted equally.
| Value | Calendar |
|---|---|
| "J" | Uses the Julian calendar. |
| "R" | Uses the Roman calendar. For years before 1583, the Julian calendar is used, and for later years, the Gregorian calendar. |
| "G" | Always uses the Gregorian calendar. |
| Anything else | Uses the default calendar. For years before 1753, the Julian calendar is used, and for later years, the Gregorian calendar. |
The output returns the calculated number of days as a number.
Here is an example for converting a date outside the range. The calculation for the Julian calendar may differ in this case.

This function corresponds to the Function Block EASTER_DATE with the Gregorian calendar.