What Day Was That

For many years, I thought about how to calculate what day it was. You know, if you tell me the date you were born, I should be able to tell you what day it was. (You can think about it as the number of days since 1/1/1900 divided by 7, with the remainder indicating the day of the week. So I know it's possible, but what is the formula that works, and is manageable in my head?) I have looked on the net and there are many articles, that use various tables, to calculate a day. But I wanted to be able to do it completely mathematically, w/o using tables. This algorithm works, but it's pretty difficult to keep track of the parts in your head while you're doing it. When I practice, I can do this correctly, maybe half the time. When I don't practice, my accuracy suffers noticeably. But, it does work. At 76, I really should practice several times a day, to ward off dementia, which does seem to be creeping up on me.

For 1900+, (for 2000+ subt 2, or add 5)

Year, +year/4

-1 if leap-year jan/feb

+ day of month

+ month bias (days over 28) is 0 3 3 6 8 11 13 16 19 21 24 26

divide by 7 and use remainder. 0=Sun, 6=Sat

(I divide by 7 along the way and only save the remainder.)

The "month bias" can be thought of as a table, but it's calculable (which is where it comes from).

Eg, Feb, it's 3, because January has 3 more than 28 days, so if Jan 2 is Tuesday, Feb 2 is Friday (Tues +3.)

month bias (0 3 3 6 8 11 13 16 19 21 24 26) oct=0 3 5 may=1 4 6 9 12