SMOLNET PORTAL home about changes
             METHOD TO CALCULATE THE DAY OF THE WEEK
                     FOR ALL DATES 1905-2099

  This is a convenient method to calculate the day of the week
  using an ordinary calculator and only a few simple formulas.


STEP 1.  Calculate MonthIndex:

  Month * 2.56 + 94

and then drop the fraction, and drop the hundreds digit, if any
(e.g., 124.72 becomes 24).  So we have an integer less than 100.


STEP 2.  With YLLD meaning "Year of Last Leap Day" (year during
which the last leap day occurred, prior to the day in question;
YLLD therefore changes after each leap day), calculate:

  YLLD / 4 + Year + MonthIndex + Day

and then divide the result by 7.


STEP 3.  Take the first digit of the decimal part (if none, use
zero), and map that to a day using the following pattern:

  +-----+-----+-----+
  | Fri | Sat |     |
  |  7  |  8  |  9  |
  +-----+-----+-----+
  | Wed | Thu |     |
  |  4  |  5  |  6  |
  +-----+-----+-----+
  | Mon | Tue |     |
  |  1  |  2  |  3  |
  +-----+-----+-----+
  | Sun |
  |  0  |
  +-----+


WAYS TO HELP YOU REMEMBER THE FORMULA:

  2.56:  256 is a power of 2 (just add a dot).
  94:  9 and 4 are both perfect squares.
  0=Sun:  The sun is a big round thing.

As for YLLD, it helps to be able to remember what numbers are
divisible by 4 (e.g., US election years).  (For early 1904 and
prior, the method is off because the last leap year was 1896.
Yet the method can work for such dates on the Julian calendar,
as every year divisible by 4 is a leap year, all the way back 
to A.D. 5, if one substitutes 93 for the constant 94 in Step 1.)
Sometimes YLLD is the same as the year in question (see below).

The formula and constants may also be easier to remember if you
know why they are used.  Most months start 2 or 3 days later in
the week cycle than the previous month, so we multiply by 2.56
to get the day-of-week offset caused by each month.  Then, we
can discard the fraction, but we also need the "plus 94, mod
100" to compensate for Feb. being a short month.  (Of course,
you could eliminate Step 1 by keeping a list of MonthIndex
values or their "mod 7" equivalents.)  The use of the keypad as
a visual aid in Step 3 is a shortcut for calculating "mod 7."


EXAMPLE 1.  December 31, 1999.

  12 * 2.56 + 94 = 124.72 (MonthIndex = 24)
  YLLD = 1996
  1996 / 4 + 1999 + 24 + 31 = 2553
  Divide by 7 = 364.714285..., first decimal = 7
  Day of Week = Fri


EXAMPLE 2.  February 29, 2000.

  2 * 2.56 + 94 = 99.12 (MonthIndex = 99)
  YLLD = 1996
  1996 / 4 + 2000 + 99 + 29 = 2627
  Divide by 7 = 375.285714..., first decimal = 2
  Day of Week = Tue


EXAMPLE 3.  March 1, 2000.

  3 * 2.56 + 94 = 101.68 (MonthIndex = 1)
  YLLD = 2000
  2000 / 4 + 2000 + 1 + 1 = 2502
  Divide by 7 = 357.428571..., first decimal = 4
  Day of Week = Wed


This method was designed to be as easy as possible to remember
and use when the only resources are your memory and an ordinary
calculator (meaning no tables or formulas stored on paper or
electronically, no mental arithmetic, no conditional branches,
minimal constants to remember, and minimal key-clicks).


Regards,
Hans Lachman
Response: text/plain
Original URLgopher://sdf.org/0/users/retroburrowers/TemporalRetrology/cc/jg
Content-Typetext/plain; charset=utf-8