Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A faster way to calculate the day-of-the-week. Parent comment
Let X be the last two digits of a year.
If X is odd, add 11.
Divide X by 2.
Let Y = 7 − (X mod 7).
Count forward Y days from that century's anchor day to get the year's doomsday.
https://arxiv.org/pdf/1010.0765
There are no comments on this comment yet.
Let X be the last two digits of a year.
If X is odd, add 11.
Divide X by 2.
If X is odd, add 11.
Let Y = 7 − (X mod 7).
Count forward Y days from that century's anchor day to get the year's doomsday.
https://arxiv.org/pdf/1010.0765