The Doomsday rule is an algorithm for working out the day of the week of a given date. It’s based on John Conway’s observation that certain memorable dates called doomsdays (4/4, 6/6, 8/8, 10/10, 12/12, 9/5, 5/9, 7/11, 11/7, …) always occur on the same day of the week in any given year. This day is known as the year’s anchor day. To compute an arbitary day of week you work out the anchor day for the given year and the offset between the target date and an appropriate doomsday. It’s ...