TI-BASIC:Easter Calculation

From Learn @ Cemetech
Jump to navigationJump to search

Routine Summary

Calculates the day that Easter Sunday falls on any given year.


Y - The year (any year at all)


Ans - The day in March of Easter Sunday (plus 31 if the month is April)

Variables Used

Y, Ans

Calculator Compatibility

TI-83/84/+/SE Author

John Horton ConwayURL: [1] Download

file eastercalculation.zip

:If Ans=50 or Ans=49 and 11≤19fPart(Y/19

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.

Date Identification

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:

:Disp sub("MARCHAPRIL",1+5(Ans>31),5

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=Template:Int(Y/100), and [H]=Template:Int(H)):


The first four lines of code implement this algorithm.

Lastly, the last line of code adjusts the date to the next Sunday using a modified version of the Day of Week routine.Footnote If you have an 84+ or 84+SE, this may as well be {{Ans+7-dayOfWk(Y,3+(Ans>31),Ans31(Ans>31))}}. /footnote

Error Conditions

  • None known.

Related Routines