This is how you figure out the day of the week for any date ever, without Google

Originally published at:


Anyone know the use case for this niche skill?

1 Like

*for dates since 1752.


I have one question: why?

1 Like

Follow up question: Why not?


In the age of “Hey Siri, what day of the week was November 22, 1838?” along with my rapidly diminishing brain capacity, I stand by my question.

1 Like

Siri: I will ask your secret crush.


Well never mind all that other stuff, I reckon it’d be pretty handy to know this:

4/4, 6/6, 8/8, 10/10, 12/12, and the last day of February all occur on the same day of the week in any year

That’s worth memorising… at least if you’ve already memorised how many days in each month.


Why the hell wasn’t this on the internet in 1999 when I was in a coding competition trying to work on this exact problem in a 4 hour timespan (with some other ones of course)? Gah!

Seriously, I tried for years after to find it because it always bugged me that there wasn’t a common algorithm for it out there.


Well, combatting this -



Seems a bit dubious to say it works for any date ever without google if it requires you to memorise a specific anchor day for every century.

If you have access to a computer and not google, your best chance is probably to calculate the difference in days to a single reference day and take modulo 7.

There is the UNIX date command:

keith@adata:~$ date -d’Dec 23 1234’
Sat Dec 23 00:00:00 LMT 1234

or did you specifically want Conways’s algorithm?

1 Like

Siri’s secret Crush:

Zeller’s congruence, the classic way to do this before Conway’s trick, was a standard exercise in computer programming texts 40+ years ago. I’m pretty sure I’ve programmed it in FORTRAN, PL/1, COBOL, Focal, and Basic. (By the time I learned Pascal and C it was no longer so common.)

I needed the algorithm, or some other trick at the time. I don’t remember the details, since it was nearly 20 years ago, but there was something in the challenge that wouldn’t have worked if you just used the UNIX date command. I think it may have been an issue with the bounds of the date or something.

This topic was automatically closed after 5 days. New replies are no longer allowed.