SMOLNET PORTAL home about changes
 This is a less involved method to calculate the day of the week
 for Gregorian dates from 1901-2099 via formulas in base 8 which
 require fewer operations than any other method not using tables,
 multiplication or division.


Given:

 XY.PQR.MO.DA as the octal digits of a Date in c.y.m.d format,
 one can convert the given Date into a day of the week in less
 than two dozen operations by means of the three steps below.


STEP 0. Calculate Offsets: bu due to leap years; W due to Lag

         pqr =  Integer(3.75 + PQR.MO)
         VW.bug = XY.pqr + XY.pqr

STEP 1. Apply Lachman's Congruence in base 8

         cow = MM+MM+MOO+O + MM+MM+MOO+O
         min = co + 71

STEP 2. Apply the octal formula for converting the Date

         10-W + b+u + P+Q+R + ~m+i+n + D+A

STEP 3. Likewise add the digits of the result, and repeat for
 each successive result until only one digit remains. This is
 a number as assigned by ISO 8601 to each day of the week:
 Mon=1  Tue=2  Wed=3  Thu=4  Fri=5  Sat=6  Sun=7.


EXAMPLE 0.  January 1st, 1901:  XY.PQR.MO.DA = 23.001.01.01 
 
 XY.pqr = 23.004
 VW.bug = 46.010
 cow = 00+00+011+1 + same = 012 + 012 = 024
 min = 02 + 71 = 073
 10-6 + 01 + 001 + 1+7+3 + 01 = 20  
 2+0 = 2    Day of Week = Tuesday  
 

EXAMPLE 1.  February 29th, 2000:  XY.PQR.MO.DA = 24.000.02.35

 XY.pqr = 24.003
 VW.bug = 50.006
 cow = 00+00+022+2 + same = 024 + 024 = 050
 min = 05 + 71 = 076
 10-0 + 00 + 000 + 1+7+6 + 3+5 = 36  3+6 = 11
 1+1 = 2    Day of Week = Tuesday


EXAMPLE 2.  March 1st, 2000:    XY.PQR.MO.DA = 24.000.03.01

 XY.pqr = 24.004
 VW.bug = 50.010
 cow = 00+00+033+3 + same = 074
 min = 07 + 71 = 100
 10-0 + 01 + 000 + 000 + 01 = 12  1+2 = 3  Day of Week = Wednesday


EXAMPLE 3.  December 31st, 2099:  XY.PQR.MO.DA = 24.143.14.37

 XY.pqr = 24.147
 VW.bug = 50.316
 cow = 11+11+144+4 + same = 172 + 172 = 364
 min = 36 + 71 = 127
 10-0 + 3+1 + 1+4+3 + 0+2+7 + 3+7 = 47  4+7 = 13
 1+3 = 4    Day of Week = Thursday


X-EXAMPLE.  January 1st, 2100:  XY.PQR.MO.DA = 25.000.01.01 
 
 XY.pqr = 25.003
 VW.bug = 52.006
 cow = 00+00+011+1 + same = 012 + 012 = 024
 min = 02 + 71 = 073
 10-2 + 00 + 000 + 1+7+3 + 01 = 22
 2+2 = 4  Day of Week = thursday-X

x-EXAMPLE.  December 31st, 1900:  XY.PQR.MO.DA = 23.000.14.37

 XY.pqr = 23.004
 VW.bug = 46.010
 cow = 11+11+144+4 + same = 172 + 172 = 364
 min = 36 + 71 = 127
 10-6 + 01 + 000 + 0+2+7 + 3+7 = 27
 2+7 = 11    Day of Week = tuesday-x


--

      REFERENCES

gopher://gopherite.org/0/users/retroburrowers/TemporalRetrology/cc/jg
gopher://gopherite.org/0/users/retroburrowers/TemporalRetrology/cc/g4
Response: text/plain
Original URLgopher://sdf.org/0/users/retroburrowers/TemporalRetrology/A/g
Content-Typetext/plain; charset=utf-8