Calculating Easter

Share business templates, ideas, experiences, etc with fellow Servoy developers here

Calculating Easter

Postby tweetie » Sun Jun 27, 2004 8:49 pm

If ya wanna calculate Easter:

Code: Select all
var aa=year%19
var cc=year%100
var bb=Math.floor(year/100)
var ee=bb%4
var dd=Math.floor(bb/4)
var ff=Math.floor((bb+8)/25)     
var gg=Math.floor((bb-ff+1)/3)
var hh=(19*aa+bb-dd-gg+15)%30
var ii=Math.floor(cc/4)
var kk=cc%4
var ll=(32 + 2*ee + 2*ii - hh - kk)%7
var mm=Math.floor((aa + 11*hh + 22*ll)/451)
var nn=Math.floor((hh + ll - 7*mm + 114 )/31)
var pp=((hh + ll - 7*mm + 114)%31)+1

nn=produces the Month
pp=produces the Day

For the dutch people:
Pinksteren is 7 weeks after Easter.
Hemelvaart is 10 days before Pinksteren.
User avatar
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 1 guest