# Differences

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision | ||

day_of_week [2017.11.14 18:46] smismi7 |
day_of_week [2020.12.29 09:38] (current) smismi7 [Convert Fahrenheit to Centigrade and Back In Your Head] |
||
---|---|---|---|

Line 1: | Line 1: | ||

+ | ~~NOCACHE~~ | ||

=====Doomsday algorithm===== | =====Doomsday algorithm===== | ||

Given a date, determine the day of the week it falls on. All based on last day of February in the year, the doomsday. | Given a date, determine the day of the week it falls on. All based on last day of February in the year, the doomsday. | ||

Line 46: | Line 47: | ||

18 is even, /2 is 9, 9 is odd +11 is 20. Mod 7 is 6, from 7 is 1, so doomsday for 1918 is Thursday\\ | 18 is even, /2 is 9, 9 is odd +11 is 20. Mod 7 is 6, from 7 is 1, so doomsday for 1918 is Thursday\\ | ||

Nov 7 is Thursday, so 11th is Monday. | Nov 7 is Thursday, so 11th is Monday. | ||

+ | |||

+ | |||

+ | <hidden page stats> | ||

+ | This page has been visited | ||

+ | {{counter|today| time| times}} today, | ||

+ | {{counter|yesterday| time| times}} yesterday, and | ||

+ | {{counter|total| time| total times}} since 12/29/2020. | ||

+ | </ |