From: "Lars Ladingkaer" Subject: Re: Calculation of Easter Date: 23 Mar 1999 00:00:00 GMT Message-ID: <7d6i78\$874\$1@news.inet.tele.dk> References: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: Department of Abuse X-Trace: news.inet.tele.dk 922143784 8420 193.88.88.10 (22 Mar 1999 23:03:04 GMT) Organization: Tele Danmark Internet NNTP-Posting-Date: 22 Mar 1999 23:03:04 GMT Newsgroups: borland.public.turbopascal Alan Edward Milton wrote: >Has anybody got details of the calulation for Easter Sunday?? >The basis of the calculation is all I need. Procedure Easter(Year : Word; Var Month, Day : Word); (* Calculates what day Easter falls on in a given year *) (* Set desired Year and result is returned in Date variable *) Var GoldenNo, Sun, Century, LeapCent, LunarCorr, Epact, FullMoon : Integer; Begin GoldenNo := (Year Mod 19) + 1; Century := (Year Div 100) + 1; LeapCent := (3 * Century Div 4) - 12; LunarCorr := ((8 * Century + 5) Div 25) - 5; Sun := (5 * Year Div 4) - LeapCent - 10; Epact := Abs(11 * GoldenNo + 20 + LunarCorr - LeapCent) Mod 30; If ((Epact = 25) And (GoldenNo > 11)) Or (Epact = 24) then Inc(Epact); FullMoon := 44 - Epact; If FullMoon < 21 then Inc(FullMoon, 30); Day := FullMoon + 7 - ((Sun + FullMoon) Mod 7); If Day > 31 then Begin Dec(Day, 31); Month := 4; End Else Month := 3; End; -- /Lars larl@et-soft.dkX (remove the X manually before emaling me)