Mathematical poem to calculate the "day of the week" for any day of any year.

Mathematical poem to calculate the "day of the week" for any day of any year.

The last of Feb., or of Jan. will do
(Except that in Leap Years it's Jan. 32)
Then for even months use the month's own day,
And for odd ones add 4, or take it away*

Now to work out your doomsday the orthodox way
Three things you should add to the century day
Dozens, remainder, and fours in the latter,
(If you alter by sevens of course it won't matter)

In Julian times, lackaday, lackaday
Zero was Sunday, centuries fell back a day
But Gregorian 4 hundreds are always Tues.
And now centuries extra take us back twos.

*According to length or simply remember,
you only subtract for September, or November.


*************************
J. H. Conway, Jan., 1976
*************************


An Example of How to do the calculation

The best way to go about using this poem to calculate the day of the week is to work backward in the poem. That is, start with the third part and figure out the century day first. For 1997, we would use the Gregorian calander, so we start by looking at the century day for the year 400 (or 800 or ... or 1600 or 2000) which always gives Tuesday as the century day. Hence, taking the 16th century (1600) and adding a century ("centuries extra") gives us Sunday ("Tuesday back two") as the century day for 1700. Similarly, we will get Friday for 1800 and Wednesday for 1900 as the century day.

Now working with Wednesday as the century day for our 1997 year, we take "Dozens, remainder and fours in the latter" from 97. Now adding these ( modulas 7; "If you alter by sevens of course it won't matter") to the century day (Wednesday) we get:
Therefore, Friday is the doomsday for 1997.

Finally, the first part will complete the calculation in the following way:
Back to Kate's homepage.