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 the intended design objective. The tabular forerunner to Tøndering's algorithm is embodied in the following K&R C function. With minor changes, it was adapted for other high level programming languages such as APL2. Posted by Tomohiko Sakamoto on the comp.lang.c Usenet newsgroup in 1992, it is accurate for any Gregorian date. IBM's Rata Die method requires that one knows the "key day" of the proleptic Gregorian calendar i.e. the day of the week of January 1, AD 1 (its first date). This has to be done to establish the remainder number based on which the day of the week is