found it very difficult to calculate the easter date. From informations I found in books I develloped a formula to be able
to at least calculate the easter date for the next 100 years .
Some month later I found a book with the gauss algorithm and was frustrated to have spent so much time for creating a formula..
Nowadays there is the internet and you easily find rules - simpler then gauss - to calculate the easter date.
Or you directly find program code

- Code: Select all
Public function CalcGregEasterDate( ByVal intYear as integer ) as date
' rule acc. http://www.arndt-bruenner.de/mathe/scripts/osterdatum.htm
Dim intA as integer , intB as integer , intC as integer , intD as integer , intE as integer , intF as integer , intG as integer
Dim intH as integer , intI as integer , intK as integer , intL as integer , intM as integer , intN as integer , intP as integer
Dim dtA as date
dtA = dateserial(intYear,1,1)
if intYear > 1582 then
' gregorian
intA = intYear mod 19
intB = int(intYear / 100)
intC = intYear mod 100
intD = int(intB / 4)
intE = intB mod 4
intF = int((intB +8) / 25)
intG = int((intB - intF + 1) / 3)
intH = (19 * intA + intB - intD - intG + 15) mod 30
intI = int(intC / 4)
intK = intC mod 4
intL = (32 + 2 * intE + 2 * intI - intH - intK) mod 7
intM = int((intA + 11 * intH + 22 * intL) / 451)
intN = int((intH + intL - 7 * intM + 114) / 31)
intP = (intH + intL - 7 * intM + 114) mod 31
dtA = dateserial(intYear , intN , intP + 1)
end if
return dtA
end function
? CalcGregEasterDate(2010)