2005/02/22

how to calculate the day of the week

EugĂȘnio told me today that by remembering twelve digits, we can know which is the first Sunday of each month and hence calculate all other days: 266-315-374-264.

There is however a neater trick:
in 2005, the following dates always fall on a Monday:
0/2 (last day of January)

0/3 (last day of February)
4/4,
6/6,
8/8,
10/10,
12/12,
7/11,
11/7,
9/5,
5/9,

This day has been baptised Doomsday (because it is
the last day of February), and in 2005 it is Monday,
in 2006 a Tuesday, in 2007 a Wednesday. 2008 is a leapyear;
by then I will explain how to deal with this case :-)

The mnemonic for May/July/September/November is:
"I have a 9 to 5 job at 7-11";
Seven-Eleven is a convenience store that opens
at 7 in the morning and closes at 11 at night.

Anyway, just remebering the "9 to 5 job" part is enough.

The trick is attributed to John Conway, whose books
("On Numbers and Games", and "Winning Ways")
I have tried to read several times. With no success, though.
BTW, the original text is far more complicated than the
explanations now available on the Internet.


See for instance
http://quasar.as.utexas.edu/BillInfo/doomsday.html
http://rudy.ca/doomsday.html
or search for "doomsday conway"