Show HN: How to mentally calculate the day of the week for any date

80 points by yang140 a day ago on hackernews | 24 comments

seanhunter | a day ago

It's pretty bad form to give the doomsday algorithm and not give credit to John H. Conway who invented it. https://en.wikipedia.org/wiki/Doomsday_rule

atestu | a day ago

He’s well credited in the article…

seanhunter | a day ago

Pretty sure he was not when I posted my comment. It currently says "more on him at the end" and that bit seems not to have been written yet. Also there are two mathematicians called "John Conway" so it's good form to say "John H Conway".

[OP] yang140 | a day ago

Author here, good call! I credit Conway in the center of the article, the content for "more on him at the end" was hidden after reader finish the challenge in part 6. I guess it worth to show it by default, updated already.

I'd also need to thanks for Dr. Arthur Benjamin. I saw his "That math show" with my 9 years old where he introduced this Doomsday rule, I thought it was really cool and try to create some interactive tutorial for it. Would love to see if this can help other kids or adults https://www.thatmathshow.com/

anas008 | a day ago

he did

zeech | a day ago

Cool site! When I do this trick I prefer using Bob Goddard's 'first Sunday' method [0]. It minimises the number of operations you need to do and makes it so you only need to keep track of one running total.

[0] https://firstsundaydoomsday.blogspot.com/2009/12/quick-start...

navaed01 | a day ago

V. Cool - thank you for building and sharing

mattdeboard | a day ago

This is amazing! What a cool website.

_dark_matter_ | a day ago

[flagged]

MDTHLN | 21 hours ago

I can’t decide whether I find the AI writing or AI design more offensive.

Laughable that the footer has the stereotypical “made with <3” tagline (because of course AI has to use an emoji instead of words), for a site that almost certainly took less time to prompt than it takes to read it.

tripdout | 9 hours ago

I know this is flagged, and I know the guidelines say not to complain about tangential annoyances, but the reason given is that "they're too common to be interesting" -- but is that true about LLM-written articles? A case could be made that it will only become more true if nobody objects.

I don't know what it is about LLM writing style, but I agree, it just triggers something in my brain and I can't get myself to read it.

mrheosuper | a day ago

>The trick = nearest squad date → leftover → walk from the Doomsday.

When i do the 31/OCT, the solution show 10/10 as nearest squadday, i though 11/7 is the nearest ?

Vishal_Max | a day ago

Never thought of this , actually enjoyed learning it. Now it is time to surprise my friends.

santah | 23 hours ago

Awesome site and guide, I just don't understand why all dates have the month in front of the date.

Isn't this very confusing to anyone outside US?

I get why it defaulted to this format, but in this day and age - it's trivial to automatically adjust it to the user's localization / preferences.

adam-a | 23 hours ago

Yes that tripped me up a few times.

I’d also suggest that when the user guesses wrong and you show the “correct” working, also continue to show the date so they can work it through correctly. The date changes right away so you can’t rework it and understand your mistake.

tchalla | 22 hours ago

It’s actually what put me off.
There are only two dates that aren't symmetrical - 3/14 and 2/28 - and they are easier to remember in the mm/yy format.

nicksaroha | 22 hours ago

Learned something new. Cool stuff. Thanks for the website.

gusrb3164 | 22 hours ago

Cool site! thank you
The difficult part, which is glanced over, is calculating the number of leap years for the year "slide" in Part 5.

A bit more guidance there would go a long way.

kepeko | 20 hours ago

It's cool. Here a little different way to calculate. Day number + month number + year number, modulo 7 => weekday number. Year number this year is 3, goes +1 every year, +2 in leap year. Month numbers if not leap year: 033614625035. Day number is ordinary day of the month. 24th Dec 2026 would be: 24 + 5 + 3 = 32. 32 mod 7 is 4 (Thursday)

happytoexplain | 17 hours ago

I don't normally bother complaining about LLM writing, but this case is uncommonly bad. Everything above the fold is a nightmare. It's physically painful to see what's being done to English, my native language.

It lacks so much human guidance that it starts to veer into nonsense: "Suspicious? Check those dates against a real calendar." This doesn't make sense in this context. Those dates are examples produced by a computer, not the result of a person actually doing the trick.

I want to cry.

fg137 | 17 hours ago

Decades ago, I was reading about tricks, or as it was put, a systematic approach to do arithmetics without a pen. Those were paid courses.

It should have been obvious by then how irrelevant the whole thing was, since calculators with all kinds of shapes and forms were already widely available.

When you look at this page, there is a fair amount of memorization needed to make it somewhat useful. Then you don't want to make any mistakes in any of the steps. And you want to make sure you still remember everything by the time you need to use it.

That is a very roundabout way to say that I am fairly confident that nobody is actually going to "learn" what's in the page and apply it in realistic situations, and it's a complete waste of electricity to vibe code this page.

liminal-dev | 15 hours ago

Oh my god that animation at the top keeps causing a layout shift on my 13 mini. Who thought that was a good idea?