Here's how to calculate the day of the week in your head
for any date after September 14, 1752. It's relatively simple
once you memorize ten month codes (None needed for April and
July). The aim of this algorithm is to produce a single digit
in the range 0 to 6. If it's a 0, it's Saturday; otherwise,
1 through 6 stand for Sunday through Friday. The algorithm
takes place in seven steps: (1) Divide the last two digits
of the year by 2, dropping any remainder. (2) If this
result is odd, subtract 3. (3) If the original year
is odd, subtract 1. (4) This algorithm is normalized
for the 1900s. Add 1 if in or beyond 2000 or 2400 AD; add
or subtract 2 for other centuries (no earlier than 9-14-1752).
(5) If the result is an even multiple of 7, set it to
0; otherwise, set it to whatever amount is needed to reach
the next highest multiple of 7. This final figure is the year-offset,
in the range 0 to 6. (6) Add the year-offset, the month
code, and the day of month. (7) Divide by 7 and keep
only the remainder. That's the day of the week. Don't forget,
in leap years (those years divisible by 4 and
not divisible by 100 unless divisible by 400)
in leap years, the codes for January and February are 0 and
3; otherwise they are 1 and 4. Here are two examples ...
Good days for a picnic! [Explanation
of Algorithm]
|