|
|
|
|
|
|
|
6.2.3.1.2.2
Easter Functions |
|
|
|
|
|
|
|
|
This section considers several different functions for the calculation of Easter date. The easter () function is simply an umbrella switch routine, which looks at the year and calls either the Gregorian or Julian routine. Many writers have produced algorithms to calculate Easter date. The ones included here have been chosen because they are famous, or at least relatively well known in the literature, and work correctly over their claimed date ranges. The Gauss routine has a very limited range of validity but is quick and shows the master, up to his usual tricks. O'Beirne (Puzzles and Paradoxes, p. 178) claims that the first error occurs in A.D. 4200 in Gauss' original papers. |
|
|
|
|
|
|
|
|
This routine (Listing 6.14) returns the date for Western Easter on a given year in either the Julian calendar system or the Gregorian calendar system for dates after A.D. 463. This date is not the Eastern Easter of the Eastern Orthodox churches. |
|
|
|
|
|
|
|
|
6.2.3.1.2.2.2 easter_gregorian () |
|
|
|
|
|
|
|
|
This routine (Listing 6.15) returns the date for Western Easter on a given year in the Gregorian calendar system. This is not the Eastern Easter of the Eastern Orthodox churches. |
|
|
|
|
| Listing 6.13 | |
|
|
|
|
int epact_gregorian_obeirne_2 (int year)
{
int a, b, c, d, g, h, t, epact;
if (year < 1583)
return (0);
b = year / 100;
c = year % 100;
a = ((5 * b) + c) % 19;
t = ((3 * b) + 75);
d = t / 4;
g = ((8 * b) + 88) / 25;
h = ((19 * a) + d - g) % 30;
epact = 23 - h;
if (epact > 0)
return (epact);
else
return (epact + 30);
}
|
|
|
|
|
|
|
|