In article <tK4gb.169281$(E-Mail Removed)>, joeblack99

@hotmail.com says...

> Hi

>

> I am writing a programme that needs to be able to calculate public holiday

> dates.

>

> Does anyone know the rules for deciding what dates Good Friday and Easter

> Monday fall on?

> (One website I found even mentions an Easter Tuesday (29 march 2005)!

>

> Thanks - Joe
This is it, in Delphi..

{************************************************* **********************

*****}

{** Return the date for easter sunday, it can be in march or april.

**}

{** If year = 0 then year = the current year

**}

{************************************************* **********************

*****}

Function TAdrockDates.ReturnEasterSunday(Year : Word) : TDateTime;

Var

century, G, I, J, K, L, EasterMonth, EasterDay : Integer;

fYear, fMonth, fDay : Word;

begin

DecodeDate(Now, fYear, fMonth, fDay);

if (Year <> 0) then

fYear := Year;

Century := fyear div 100;

G := fyear mod 19;

K := (Century - 17) div 25;

I := (Century - Century div 4 - (Century - K) div 3 + 19*G + 15) mod

30;

I := I - (I div 2

*(1 - (I div 2

*(29 div (I + 1))*((21 - G) div

11));

J := (fYear + fYear div 4 + I + 2 - Century + Century div 4) mod 7;

L := I - J;

EasterMonth := 3 + (L + 40)div 44;

EasterDay := L + 28 - 31*(EasterMonth div 4);

Result := EncodeDate(fYear, EasterMonth, EasterDay);

end;

--

Duncan