:int(Y/ᴇ2 :50-30fPart((11(1+19fPart(Y/19))-Ans+int(Ans/4)+int(8(Ans+11)/25))/30 :If Ans=50 or Ans=49 and 11≤19fPart(Y/19 :Ans-1 :round(Ans+7-7fPart((int(23(3+(Ans>31))/9)+Ans-31(Ans>31)+2+Y+int(Y/4)-int(Y/ᴇ2)+int(Y/400))/7),0
This is the TI-BASIC version of an Easter Calculation algorithm by John Horton Conway (famous for creating the cellular automata "The Game of Life"). After implementation of this program, 3+(Ans>31) is the month it occurs in, and Ans-31(Ans>31) is the day.
This code, as it stands right now, displays the day of March it falls on (if it's over 31, then the day in April+31).
Append the following code to display the actual day:
:ClrHome :Disp sub("MARCHAPRIL",1+5(Ans>31),5 :Output(1,7,Ans-31(Ans>31
Why it Works
Easter is the first Sunday strictly after the Paschal Full Moon, which is an approximation of the real full moon (the 14th day of a lunar month, specifically), although it may be off by as much as two days.
The formula is
except if the formula gives April 19, take April 18, and if the formula gives you April 18 and G≥12, take April 17.
Here is the value of G:
Here is the value of C (with H=int(Y/100), and [H]=int(H)):
The first four lines of code implement this algorithm.
- None known.