Re: 'Prime Time' calculator

new topic     » goto parent     » topic index » view thread      » older message » newer message

I wrote:
> 
> Sorry, hit enter a little soon..
>   I should add I need to handle this not only for the UK but also for the
> Netherlands and South Africa..
>   I can't find an existing include in the archives, does anyone have
> anything already or care to help?
> 
I'm getting somewhere(!?), I now have a formula to calculate Easter Day
(courtesy of Carl Friedrich Gauss)

integer a, b, c, d, e
sequence TimeAndDate, Easter
TimeAndDate = date() 
  year = TimeAndDate[1] + 1900
a = remainder(year, 19)
b = remainder(year, 4)
c = remainder(year, 7)

d = remainder((19*a + 24), 30)
e = remainder((2*b + 4*c + 6*d + 5), 7)

if d+e < 10 then Easter = (d+e+22) & " March"
else Easter = (d+e-9) & " April"
end if


Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu