Author: Manuel Sarmiento
Here is another function that calculates the Good Thursday and any other related
date for eny year. The algorithm provided here is straightforward in the sense that
it calculates the Good Thursday (which is the jewish passover) as the thursday
ocurring in the same week as the first spring full moon. Obviously the function can
be easily adapted to calculate any full moon down to the second.
Answer:
1 function good_thursday(year: integer): tdatetime;
2 const3 full_moon: tdatetime = 34804.33889; {15/4/95 8:08}4 sunday: tdatetime = 1;
5 sinodic_month: tdatetime = 29.53058912;
6 7 var8 equinoccio: tdatetime;
9 lunar_months: double;
10 full_moon, weeks: double;
11 12 begin13 if year < 100 then14 if year year := year + 2000
15 else16 year := year + 1900;
17 equinoccio := encodedate(year, 3, 21);
18 lunar_months := 10000 - Int(10000 - (equinoccio - full_moon) / sinodic_month);
19 full_moon := full_moon + sinodic_month * lunar_months;
20 weeks := 10000 - Int(10000 - (full_moon - sunday) / 7);
21 good_thursday := sunday + 7 * weeks - 3;
22 end;