Determination of the day of the week determined for the latter part of the analysis. By using a given day August 13, 2009 which was a Thursday as a reference, with "Base" and "n" being the number of days and weeks it has been since 01/01/0001 to the given day, respectively and "k" the day into the given week which must be less than 7, "Base" is expressed as Knowing that a year divisible by 4 or 400 is a leap year while a year divisible by 100 and not 400 is not a leap year, a software program can be written to find the number of
Determination of the day of the week enter a self-contained function for converting a Gregorian date into a numerical day of the week. It preserves neither y nor d, and returns 0 = Sunday, 1 = Monday, etc. Shortly afterwards, Hans Lachman streamlined their algorithm for ease of use on low-end devices. As designed originally for four-function calculators, his method needs fewer keypad entries by limiting its range either to A.D. 1905-2099, or to historical Julian dates. It was later modified to convert any Gregorian date, even on an abacus. On Motorola 68000-based devices, there is similarly less need of either processor registers or opcodes, depending on