Hi Daniel!
Thanks for tracking that one down. I do like to have two different
methods for cross checking purposes and I'll run Laurent's up against
mine tomorrow.
Meanwhiles, no sooner did I get back from the Vatican, than the Greeks
came knocking on my door saying that now they're the Euro Champions,
they deserve a bit of respect. And what about Orthodox Easter!
So here's the code for that one plus a minor correction to the earlier
post that was revealed by the dreaded Ctrl + Alt + F9
Function EASTER(year As Single) As Date
'Based on Claus Tondering algorithm interpretation.
'See
http://www.tondering.dk/claus/cal/node3
'Norman Harker 10-Jul-2004
Dim G As Integer: Dim C As Integer: Dim H As Integer
Dim I As Integer: Dim J As Integer: Dim L As Integer
Dim EM As Integer: Dim ED As Integer
Dim Adj1904 As Integer
G = year Mod 19
C = year \ 100
H = (C - C \ 4 - (8 * C + 13) \ 25 + 19 * G + 15) Mod 30
I = H - (H \ 28) * (1 - (29 \ (H + 1)) * ((21 - G) \ 11))
J = (year + year \ 4 + I + 2 - C + C \ 4) Mod 7
L = I - J
EM = 3 + (L + 40) \ 44
ED = L + 28 - (31 * (EM \ 4))
If ActiveWorkbook.Date1904 = True Then
Adj1904 = 365 * 4 + 2
End If
EASTER = DateSerial(year, EM, ED) - Adj1904
End Function
Function ORTHODOXEASTER(year As Single) As Date
'Based on Claus Tondering algorithm interpretation.
'See
http://www.tondering.dk/claus/cal/node3
'Norman Harker 11-Jul-2004
Dim G As Integer: Dim I As Integer: Dim J As Integer
Dim L As Integer
Dim EM As Integer: Dim ED As Integer
Dim Adj1904 As Integer: Dim JulAdj As Integer
G = year Mod 19
I = (19 * G + 15) Mod 30
J = (year + year \ 4 + I) Mod 7
L = I - J
EM = 3 + (L + 40) \ 44
ED = L + 28 - (31 * (EM \ 4))
If ActiveWorkbook.Date1904 = True Then
Adj1904 = 365 * 4 + 2
End If
JulAdj = 10 + (year \ 100) - 16 - (year \ 400) + 4
ORTHODOXEASTER = DateSerial(year, EM, ED) - Adj1904 + JulAdj
End Function
The Orthodox Easter algorithm is based upon the Julian Calendar so
I've had to make a double adjustment. One for the 1904 Date System and
one for the Julian > Gregorian uplift.
The calculations of Orthodox Easter seem to square with the multi cell
formula version and with records I have of Orthodox Easter.
Your previous post was interesting! I wonder if a database of the
dates without formulas in an Addin's worksheet would be a more
efficient way of handling the problem. Use the formulas to establish
the dates, parallel to the year numbers. Copy > Paste Special Values.
Then use VBA to just look up the date for the input year.
I'll put in attributions for in the final versions.
I've left unsnipped so as to get Laurent's code and the above in a
single post.