Skip to content

Instantly share code, notes, and snippets.

@nickludlam
Created April 15, 2011 18:12
Show Gist options
  • Save nickludlam/922170 to your computer and use it in GitHub Desktop.
Save nickludlam/922170 to your computer and use it in GitHub Desktop.
Pseudo code to calculate when Easter falls. From http://www.smart.net/~mmontes/nature1876.html
a=year%19
b=year/100
c=year%100
d=b/4
e=b%4
f=(b+8)/25
g=(b-f+1)/3
h=(19*a+b-d-g+15)%30
i=c/4
k=c%4
l=(32+2*e+2*i-h-k)%7
m=(a+11*h+22*l)/451
Easter Month =(h+l-7*m+114)/31 [3=March, 4=April]
p=(h+l-7*m+114)%31
Easter Date=p+1 (date in Easter Month)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment