home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!uvaarpa!darwin.sura.net!paladin.american.edu!auvm!CS.CHALMERS.SE!APOSTOLO
- Return-Path: <@BROWNVM.BROWN.EDU:HELLAS@UGA.BITNET>
- X-Mailer: ELM [version 2.4 PL17]
- Mime-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: quoted-printable
- Content-Length: 2268
- Message-ID: <9301271251.AA01802@animal.cs.chalmers.se>
- Newsgroups: bit.listserv.hellas
- Approved: NETNEWS@AUVM.AMERICAN.EDU
- Date: Wed, 27 Jan 1993 13:51:12 +0100
- Reply-To: Apostolos Syropoulos <apostolo@CS.CHALMERS.SE>
- Sender: The Hellenic Discussion List <HELLAS@AUVM.BITNET>
- From: Apostolos Syropoulos <apostolo@CS.CHALMERS.SE>
- Subject: Programma gia to ... Pasxa
- Comments: To: Hellas mailing address <hellas@uga.cc.uga.edu>
- Lines: 86
-
- Epeidh kapoios filos rwthse gia to pote peftei to Pasxa skefthka pws isws
- ajizei ton kopo na steilw to parakatw programma pou upologizei thn
- hmeromhnia tou pasxa. To programma einai grammeno se standard Pascal.
-
- apostolos...
-
- -----------------------------------------------------------------------------
-
- program EasternOrthodoxEaster(input,output);
- var year,epakti,month,fullmoon,Easter,fullmoonday:integer;
-
- function daynumber(dd,mm,yy:integer):integer;
- var yearincentury,century:integer;
- day,month,year:integer;
- begin
- month:=mm; year:=yy; day:=dd;
- century:=year div 100;
- yearincentury:=year mod 100;
- if month>=3 then
- month:=month-2
- else
- begin
- month:=month+10;
- if yearincentury>0 then
- =09 yearincentury:=yearincentury-1
- else
- begin
- =09 yearincentury:=99;
- =09 century:=century-1
- end
- end;
- daynumber:=(trunc(2.61*month-0.2)
- =09 +day+yearincentury
- =09 +century div 4
- =09 + yearincentury div 4
- =09 - 2*century) mod 7
- (* if daynumber=0 then day is Sunday, *)
- (* if daynumber=1 then day is Monday, etc. *)
- end; (* of function daynumber *)
-
- begin (* main program *)
- writeln('Eastern Orthodox Easter Day Calculation Program.');
- writeln;
- repeat
- writeln('Enter year...');
- write('?'); readln(year)
- until (year>=1753) and (year<maxint);
- epakti:=(year-2) mod 19 * 11 mod 30;
- if epakti>23 then
- month:=4
- else
- month:=3;
- fullmoon:=44 - epakti + 13;
- if (month=4) and (fullmoon>30) then
- begin
- month:=month+1;
- fullmoon:=fullmoon-30
- end
- else if (month=3) and (fullmoon>31) then
- begin
- month:=month+1;
- fullmoon:=fullmoon-31
- end;
- fullmoonday:=abs(daynumber(fullmoon,month,year));
- case fullmoonday of
- 0: Easter:=fullmoon+7;
- 1: Easter:=fullmoon+6;
- 2: Easter:=fullmoon+5;
- 3: Easter:=fullmoon+4;
- 4: Easter:=fullmoon+3;
- 5: Easter:=fullmoon+2;
- 6: Easter:=fullmoon+1
- end;
- if (month=3) and (Easter>31) then
- begin
- month:=month+1;
- Easter:=Easter-31
- end
- else if (month=4) and (Easter>30) then
- begin
- month:=month+1;
- Easter:=Easter-30
- end;
- writeln;
- writeln('Easter date :',Easter:2,'-0',month:1,'-',year:4)
- end. (* of program *)
-