News for hackers. Stuff that matters.
Re:A faster way to calculate the day-of-the-week by phpdave11 on Thursday August 20, 2026 @08:59AM (#49374048)
For figuring the doomsday of a particular year, you can use the Odd+11 rule.

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

There are no comments on this comment yet.