Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 735 Bytes

README.md

File metadata and controls

10 lines (9 loc) · 735 Bytes

Day-of-Week

Python function accepts mm/dd/yyyy and outputs day of week as string and integer. Any date since 1600.

This Python algorithm is based upon one provided by Dr. Arthur Benjamin of Harvey Mudd College. It is explained in his lecture in The Great Courses course "The Secrets of Mental Math" and his book "Secrets of Mental Math" with Dr. Michael Shermer. To preserve the attribution of his method of mental math, I have deliberately omitted the memorization secrets. You will have to purchase his materials for that. I simply offer this simple calculation for the day of the week for any date since 1600 on the Gregorian calendar. Note that not all countries adopted the Gregorian calendar at the same time. Jerald Cogswell