Easter Sunday is the Sunday following the Paschal Full Moon. This full moon does not correspond to the actual full moon. It is a historical artifact determined from tables and it may differ from the date of the actual full moon by up to two days currently.
There are three valid definitions or methods to compute the date of Easter. The first has been used since 326 AD and is based on the Julian Calendar. It is based on a simple cycle of 19 Julian calendar dates and computes a Julian calendar date. The Julian calendar was last used in Greece in 1923.
The second method uses the same cycle as the first method; but Julian calendar dates are converted to the equivalent Gregorian calendar date. It applies only for the years 1583 to 4099. (The Gregorian calendar will need to be adjusted by 4100 AD). This method is currently used by Orthodox Churches.
In the third method, the date of the Paschal Full Moon is calculated from a complex set of tables, based on the Gregorian calendar, that model the relationship between the sun, moon, and earth as understood in 1582. It also applies only for the years 1583 to 4099. This method was adopted in 1583 in Europe, 1753 by England, and is currently used by Western churches.
Zeno 1.2 is an interpreter for the Zeno programming language. It is an easy to learn and is suitable for educational purposes.
program
var day, month, year, method : int
var ans : string
put "Choose year and method"
put "1. The original calculation based on the Julian calendar."
put "2. The original calculation, with the Julian date."
put " converted to the equivalent Gregorian date."
put "3. The revised calculation based on the Gregorian calendar."
put "Today, Western churches use 3 while Orthodox churches use 2."
put ""
repeat
repeat
put "year"...
get year
put "method"...
get method
until year >= 1583
if easter( day, month, year, method ) then
case month of
value 3: put "March "...
value 4: put "April "...
value 5: put "May "...
end case
put day
else
put "error"
end if
until not another
end program
function another : boolean
var ans : string
put "another [Y|N]"...
get ans
return (ans[1] = 'Y') or (ans[1] = 'y')
end function
function easter( var d, m : int, y, method : int ) : boolean
% default values for invalid arguments
d := 0
m := 0
if (method < 1) or (method > 3) then
put "Method must be 1, 2 or 3"
return false
elsif (method = 1) and (y < 326) then
put "This method applies to all years from 326 AD"
return false
elsif ( (method = 2) or (method = 3) ) and ( (y < 1583) or (y > 4099) ) then
put "This method applies only for years 1583 to 4099"
return false
end if
% Calculate Easter Sunday date
var FirstDig, Remain19, temp : int % intermediate results
var tA, tB, tC, tD, tE : int % table A to E results
FirstDig := y div 100 % first 2 digits of year
Remain19 := y mod 19 % remainder of year divide by 19
if (method = 1) or (method = 2) then
% calculate PFM date
tA := ((225 - 11 * Remain19) mod 30) + 21
% find the next Sunday
tB := (tA - 19) mod 7
tC := (40 - FirstDig) mod 7
temp := y mod 100
tD := (temp + temp div 4) mod 7
tE := ((20 - tB - tC - tD) mod 7) + 1
d := tA + tE
% convert Julian to Gregorian date
if (method = 2) then
% 10 days were skipped in the Gregorian calendar from 5-14 Oct 1582
temp := 10
% Only 1 in every 4 century years are leap years in the Gregorian
% calendar (every century is a leap year in the Julian calendar)
if y > 1600 then
temp := temp + FirstDig - 16 - ( (FirstDig - 16) div 4)
end if
d := d + temp
end if
elsif method = 3 then
% calculate date of Paschal Full Moon
temp := (FirstDig - 15) div 2 + 202 - 11 * Remain19
case FirstDig of
value 21, 24, 25, 27, 28, 29, 30, 31, 32, 34, 35, 38:
temp := temp - 1
value 33, 36, 37, 39, 40:
temp := temp - 2
end case
temp := temp mod 30
tA := temp + 21
if temp = 29 then
tA := tA - 1
end if
if (temp = 28) and (Remain19 > 10) then
tA := tA - 1
end if
% find the next Sunday
tB := (tA - 19) mod 7
tC := (40 - FirstDig) mod 4
if tC = 3 then
tC := tC + 1
end if
if tC > 1 then
tC := tC + 1
end if
temp := y mod 100
tD := (temp + temp div 4) mod 7
tE := ((20 - tB - tC - tD) mod 7) + 1
d := tA + tE
end if
% return the day and month
% Note: for method 2, Easter Sunday can occur in May
if d > 61 then
d := d - 61
m := 5
elsif d > 31 then
d := d - 31
m := 4
else
m := 3
end if
return true
end function
year? 2004 method? 3 April 11 another [Y|N]? y year? 2005 method? 3 March 27 another [Y|N]? y year? 2006 method? 3 April 16 another [Y|N]? n
This simplified Easter Dating Method was developed by Ronald W. Mallen, Adelaide, Australia. The algorithm was developed by Greg Mallen. ASSA: Easter Dating Method
AbCd Classics - free on-line books