John Conway's Doomsday Algorithm

This is a very good party trick to learn


  • Pi day (March 14) and the last day of February is Doomsday.
  • Apart from February, the $n$th day of the $n$th month is Doomsday for all even months.
  • Switch dates for months 9, 5 and 7, 11 (May 9, Sep 5, Jul 11, Nov 7)
    • We already know March. January has Doomsday on the 3rd on non-leap years and on the 4th on a leap year.
  • Doomsday advances by one day each year because 365 divided by 7 leaves 1 remainder.
  • Doomsday advances two days each leap year.

https://en.wikipedia.org/wiki/Doomsday_rule