begin

library A1, A4, A5, A15;

   procedure get the date of Easter Sunday (Easter day, Easter month, given year);
   comment this procedure implements an algorithm due to T.H. O'Beirne;
         value  given year;
         integer given year, Easter month, Easter day;
      begin

         procedure divide (dividend, divisor, quotient, remainder);
            value dividend, divisor;
            integer dividend, divisor, quotient, remainder;
         begin

         integer q;

         q := dividend !div divisor;
         remainder := dividend  -  divisor  *  q;
         quotient := q;
         end divide;

      integer a, b, c, h;

      divide(given year, 19, Easter month, a);
      divide(given year, 100, b, c);
      divide(b, 4, Easter day, given year);
      divide(19 * a + b - Easter day + 15 - ((8 * b + 13) !div 25),  30,  Easter month,  h);
      divide(c, 4, b, Easter day);
      divide(2 * (given year + b) - h - Easter day + 32, 7, Easter month, c);
      h := h + c - 7 * ((a + 11 * h + 19 * c) !div 433);
      Easter month := (h + 90) !div 25;
      divide(33 * Easter month + h + 19, 32, b, Easter day);
      end get the date of Easter Sunday;

   procedure show a range of dates (first year, final year);
         value  first year, final year;
         integer first year, final year;
      begin

      integer this year;

      for this year := first year step 1 until final year do
         begin
         get the date of Easter Sunday(Easter day, Easter month, this year);
         write text(30, {In$});
         write(30, format({dddds}), this year);
         write text(30, {Easter$Sunday$is$on$});
         write(30, format({dd}), Easter day);
         write text(30, {/});
         write(30, format({dd}), Easter month);
         write text(30, {$and$KDF9$is});
         write(30, format({s-nd}), this year - 1964);
         write text(30, {$years$old{c}});
         end
      end show a range of dates;

integer Easter day, Easter month, data year;

open(20);
data year := read(20);
close(20);

write text(30, {These$are$the$21$years$of$KDF9:{c}});
show a range of dates (1960, 1980);

if data year >= 2009 then
   begin
   write text(30, {These$are$the$years$of$ee9:{c}});
   show a range of dates (2009, data year);
   end 

write text(30, {These$are$the$next$21$years});
if data year >= 2020 then
   write text(30, {$(making$optimistic$assumptions)});
write text(30, {{c}});
show a range of dates (data year + 1, data year + 21);

close(30);
end
|
2021;
|