Determination of the day of the week ISO 8601. The day designated with 7 may also be counted as "0", by applying the arithmetic modulo 7, which calculates the remainder of a number after division by 7. Thus, the number 7 is treated as 0, 8 as 1, 9 as 2, 18 as 4 and so on. If Sunday is counted as day 1, then 7 days later (i.e. day 8) is also a Sunday, and day 18 is the same as day 4, which is a Wednesday since this falls three days after Sunday. The basic approach of nearly all of the methods to calculate the
Determination of the day of the week week is where the positive modulus is chosen. The value of is obtained from the following table: The value of is obtained from the following table, which depends on the calendar. For the Gregorian calendar, For the Julian calendar, Charles Lutwidge Dodgson (Lewis Carroll) devised a method resembling a puzzle, yet partly tabular in using the same index numbers for the months as in the "Complete table: Julian and Gregorian calendars" above. He lists the same three adjustments for the first three months of non-leap years, one 7 higher for the last, and gives cryptic instructions for finding the rest;