Determination of the day of the week day of the week begins by starting from an ‘anchor date’: a known pair (such as January 1, 1800 as a Wednesday), determining the number of days between the known day and the day that you are trying to determine, and using arithmetic modulo 7 to find a new numerical day of the week. One standard approach is to look up (or calculate, using a known rule) the value of the first day of the week of a given century, look up (or calculate, using a method of congruence) an adjustment for the month, calculate the number of leap years
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