alt.hn

2/21/2026 at 9:49:23 PM

Gauss's Weekday Algorithm, Visualized

https://lukasmetzner.github.io/blog/gauss-weekday.html

by lukasmetzner

2/26/2026 at 4:58:01 AM

This is simply the fact that 365 % 7 == 1, with leap year adjustments.

by userbinator

2/26/2026 at 10:24:58 AM

That's correct, but it's pretty well-hidden because at first sight there is no term that's just the year modulo 7. That's because a Gregorian calendar cycle of 400 years is coincidentally an integer amount of weeks long, so after the term modulo 400 you don't need another correction anymore.

To recover the fact that 365 % 7 == 1 from the given formula, one can notice that the sum of the coefficients 5+4+6=15, which modulo 7 is 1.

by kmm

2/26/2026 at 5:55:18 AM

I see only colored text, where is the visualization?

by mschnell

2/26/2026 at 8:00:45 AM

Imust admit I expected more, too.

by wolfi1

2/26/2026 at 8:01:58 AM

as Easter is nearing the Gaussian compute algorithm deserves some attention,too

by wolfi1

2/26/2026 at 5:34:32 AM

With this plus the Doomsday algorithm, I am invincible.

by IncreasePosts

2/26/2026 at 9:19:13 AM

For people who don’t know, John H. Conway’s doomsday algorithm allows you to compute the day of the week for any date by starting from a set of memorable dates (called “doomsdays”) and working from there. https://en.wikipedia.org/wiki/Doomsday_rule

So for example doomsday for this year is a Saturday, so I know the last day in February is a Saturday (this Saturday in fact) and also that Independence Day, Boxing Day and Halloween are also going to be on Saturday this year, because they are all Doomsdays (on non-leap years).

by seanhunter