News for hackers. Stuff that matters.
Re:Calculate the day of the week for any date in your head by bumbledraven on Wednesday January 01, 2020 @11:18AM (#21928650)
A simpler and easier way to calculate the day of the week for any date is the First Sunday Doomsday algorithm: http://firstsundaydoomsday.blogspot.com/2009/12/quick-start-...

(There’s also a earn-by-example page: http://firstsundaydoomsday.blogspot.com/2011/01/learn-by-exa...)

Using Sundays rather than doomsdays simplifies the arithmetic. Another improvement the above approach incorporates is the odd+11 rule for calculating the year code.

There are no comments on this comment yet.