5
� 1995 by Andreas Tetzl
9
This is a little program to calculate the date of
10
easter for years between 1583 and 2299.
12
Start it in a shell with the year as argument.
17
Translated to fpc pascal.
20
nils.sjoholm@mailbox.swipnet.se
25
const version : pchar = '$VER: easter v1.0 (3-Nov-95) by Andreas Tetzl';
27
VAR i,a,b,c,d,e,m,n : Integer;
28
year, month, day : longint;
33
if (ParamStr(1) = '?') or (ParamStr(1) = '') then
39
i:=StrToLong(ParamStr(1),year);
40
if (year<1583) or (year>2299) then
42
Writeln('only years between 1583 and 2299 allowed');
47
1583..1699 : BEGIN m:=22; n:=2; END;
48
1700..1799 : BEGIN m:=23; n:=3; END;
49
1800..1899 : BEGIN m:=23; n:=4; END;
50
1900..2099 : BEGIN m:=24; n:=5; END;
51
2100..2199 : BEGIN m:=24; n:=6; END;
52
2200..2299 : BEGIN m:=25; n:=0; END;
59
e:=(2*b+4*c+6*d+n) mod 7;
70
if (month=4) and (day=26) then day:=19;
71
if (month=4) and (day=25) and (d=28) and (e=6) and (a>10) then day:=18;
74
if month=3 then Write('Mar') else Write('Apr');
80
Revision 1.1 2002/11/28 19:42:26 nils
b'\\ No newline at end of file'