home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / bit / listserv / hellas / 22394 < prev    next >
Encoding:
Text File  |  1993-01-28  |  3.0 KB  |  106 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!uvaarpa!darwin.sura.net!paladin.american.edu!auvm!CS.CHALMERS.SE!APOSTOLO
  3. Return-Path: <@BROWNVM.BROWN.EDU:HELLAS@UGA.BITNET>
  4. X-Mailer: ELM [version 2.4 PL17]
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: quoted-printable
  8. Content-Length: 2268
  9. Message-ID: <9301271251.AA01802@animal.cs.chalmers.se>
  10. Newsgroups: bit.listserv.hellas
  11. Approved: NETNEWS@AUVM.AMERICAN.EDU
  12. Date:         Wed, 27 Jan 1993 13:51:12 +0100
  13. Reply-To:     Apostolos Syropoulos <apostolo@CS.CHALMERS.SE>
  14. Sender:       The Hellenic Discussion List <HELLAS@AUVM.BITNET>
  15. From:         Apostolos Syropoulos <apostolo@CS.CHALMERS.SE>
  16. Subject:      Programma gia to ... Pasxa
  17. Comments: To: Hellas mailing address <hellas@uga.cc.uga.edu>
  18. Lines: 86
  19.  
  20.  Epeidh kapoios filos rwthse gia to pote peftei to Pasxa skefthka pws isws
  21. ajizei ton kopo na steilw to parakatw programma pou upologizei thn
  22. hmeromhnia tou pasxa. To programma einai grammeno se standard Pascal.
  23.  
  24.   apostolos...
  25.  
  26. -----------------------------------------------------------------------------
  27.  
  28. program EasternOrthodoxEaster(input,output);
  29. var year,epakti,month,fullmoon,Easter,fullmoonday:integer;
  30.  
  31. function daynumber(dd,mm,yy:integer):integer;
  32. var yearincentury,century:integer;
  33.     day,month,year:integer;
  34. begin
  35.    month:=mm; year:=yy; day:=dd;
  36.    century:=year div 100;
  37.    yearincentury:=year mod 100;
  38.    if month>=3 then
  39.       month:=month-2
  40.    else
  41.    begin
  42.       month:=month+10;
  43.       if yearincentury>0 then
  44. =09 yearincentury:=yearincentury-1
  45.       else
  46.       begin
  47. =09 yearincentury:=99;
  48. =09 century:=century-1
  49.       end
  50.    end;
  51.    daynumber:=(trunc(2.61*month-0.2)
  52. =09      +day+yearincentury
  53. =09      +century div 4
  54. =09      + yearincentury div 4
  55. =09      - 2*century) mod 7
  56. (* if daynumber=0 then day is Sunday, *)
  57. (* if daynumber=1 then day is Monday, etc. *)
  58. end; (* of function daynumber *)
  59.  
  60. begin (* main program *)
  61.    writeln('Eastern Orthodox Easter Day Calculation Program.');
  62.    writeln;
  63.    repeat
  64.        writeln('Enter year...');
  65.        write('?'); readln(year)
  66.    until (year>=1753) and (year<maxint);
  67.    epakti:=(year-2) mod 19 * 11 mod 30;
  68.    if epakti>23 then
  69.       month:=4
  70.    else
  71.       month:=3;
  72.    fullmoon:=44 - epakti + 13;
  73.    if (month=4) and (fullmoon>30) then
  74.    begin
  75.        month:=month+1;
  76.        fullmoon:=fullmoon-30
  77.    end
  78.    else if (month=3) and (fullmoon>31) then
  79.    begin
  80.        month:=month+1;
  81.        fullmoon:=fullmoon-31
  82.    end;
  83.    fullmoonday:=abs(daynumber(fullmoon,month,year));
  84.    case fullmoonday of
  85.       0: Easter:=fullmoon+7;
  86.       1: Easter:=fullmoon+6;
  87.       2: Easter:=fullmoon+5;
  88.       3: Easter:=fullmoon+4;
  89.       4: Easter:=fullmoon+3;
  90.       5: Easter:=fullmoon+2;
  91.       6: Easter:=fullmoon+1
  92.    end;
  93.    if (month=3) and (Easter>31) then
  94.    begin
  95.        month:=month+1;
  96.        Easter:=Easter-31
  97.    end
  98.    else if (month=4) and (Easter>30) then
  99.    begin
  100.        month:=month+1;
  101.        Easter:=Easter-30
  102.    end;
  103.    writeln;
  104.    writeln('Easter date :',Easter:2,'-0',month:1,'-',year:4)
  105. end. (* of program *)
  106.