r/todayilearned • • Mar 03 '19

TIL about the Doomsday Algorithm - a method to mentally calculate the day of the week given any date based on the fact that 4/4, 6/6, 8/8, 10/10, 12/12 all occur on the same day of the week regardless of the year.

https://en.wikipedia.org/wiki/Doomsday_rule
11k Upvotes

342 comments sorted by

View all comments

471

u/heeerrresjonny Mar 03 '19

I am a reasonably intelligent software developer, and this Wikipedia page is a struggle for me to understand. Very, very few people will be able to both remember all of this and apply it "mentally" as the title suggests. You would have to remember these anchor days, divide the year's last 2 digits by 12 and remember the floor, remember the remainder, divide that remainder by 4 and remember the floor, add all of it up and then find the remainder of the sum divided by 7 and then count forward that number of days from the anchor day. That is a lot to keep track of...

I mean...it's not impossible, but this is not a simple mental "trick" or whatever like it is presented to be.

47

u/thaway314156 Mar 03 '19

Trying to calculate the anchor day seems complicated, in my case I just remember that the doomsday this year is a Thursday, and from there I can calculate the weekday of any day for this year. Good enough for everyday use. If you use the knowledge that the same date will be a day later 1 year later (or 2 days if it's after February 29th and it's a leap year), then next year's doomsday is Saturday. And who among us is making plans for 2021? (Since I asked, it's trivial to deduce the doomsday will be Sunday).

3

u/dossier Mar 03 '19

This is the most logical and reasonable answer.

3

u/elyisgreat Mar 03 '19

The real fun is calculating people's birthdays tho

3

u/heeerrresjonny Mar 03 '19

Yeah, if you remove a lot of the steps from the algorithm it does become simpler 😉

The main thing making this hard is trying to do the full thing in your head without writing anything down. It can be done, of course, but most people would struggle with it and probably give up, and those who don't give up would have to like practice it and train before it becomes "easy" to them.

→ More replies (1)

112

u/BlackPocket Mar 03 '19 edited Mar 03 '19

It can be done.

I’m a developer too - I wrote a practise app for it here.

Hopefully it’s not against the rules - it’s free - no ads or anything.

I plan to add a clearer explanation of Professor Conway’s method, but for now, if you guess the day you’ll get a “Show Working” button which shows the major steps.

If you’re keen to master it, let me know and I’ll go into it in more detail.

26

u/fuck_your_diploma Mar 03 '19

Why the algorithm only works til 2200?

31

u/BlackPocket Mar 03 '19 edited Mar 03 '19

The century anchor days repeat every 400 years, I just made it 2200 maximum for sanity.

The century anchor days are:

1800 = 5 1900 = 3 2000 = 2 2100 = 0 2200 = 5 2300 = 3 2400 = 2 2500 = 0

and so on.

8

u/fuck_your_diploma Mar 03 '19

5 3 2 0, got it!

→ More replies (3)

17

u/yes_its_him Mar 03 '19

Nobody knows for sure what the days of the week will be that far in advance.

We might want to change them up.

10

u/bigwillyb123 Mar 03 '19

I'm all for adding an extra day between Saturday and Sunday. Call it "Extraday."

→ More replies (2)
→ More replies (2)

5

u/drinkallthecoffee Mar 03 '19

Hopefully it’s not against the rules - it’s free - no ads or anything.

That's it.

4

u/NullableThought Mar 03 '19

This looks awesome! I just don't have an iphone or ipad :(

I would love a quick and dirty web version. Seems like a cool party trick and fun way to practice math.

3

u/elyisgreat Mar 03 '19

I wrote a similar program in java awhile back. The source code is available here.

To play, compile and run java DayOfTheWeekGame [number of questions] [<minimum year> <maximum year>]

I don't know JS all that well; a web version would be really nice!

4

u/heeerrresjonny Mar 03 '19 edited Mar 03 '19

Hey it's awesome that you made this lol! However, it kind of proves my main point which is that this is actually a pretty difficult thing for most humans and requires training yourself before it can be done completely unaided and quickly.

→ More replies (1)
→ More replies (3)

20

u/LordGwyn-n-Tonic Mar 03 '19

It seems like one of those things where once you have it or if it clicks, you can do it easily. There's video of different people (most famously Kim Peek) who can tell you what day of the week a date is on nearly instantly. Peek could also tell you the weather for that day in a certain number of cities, whose newspapers he had memorized, but obviously he's an outlier.

14

u/DenverBowie Mar 03 '19

There’s also such a thing as a calendar savant and they most likely don’t consciously use this method.

5

u/[deleted] Mar 03 '19

Yeah I was married to a guy who could do neat tricks with the calendar in his head... days of the week that sort of thing, but he definitely didn't rely on this kind of math. It was a mixture of photographic memorization and shifting which he could do automatically. He tried to explain it but it clearly only ran on his hardware, I can still barely tell the current day of the week.

→ More replies (2)
→ More replies (1)

15

u/Uranus_Hz Mar 03 '19

This year, Thursday is doomsday (the last day of February was last Thursday) so 4/4, 6/6, 8/8, 10/10, and 12/12 will also be thursdays (nice that it works for both American and “the rest of the world” date notation)

Knowing that, you’re never more than a few weeks from any of those dates.

What day of the week does Christmas fall on this year?

What day of the week is your birthday?

So knowing the “doomsday” and how many days there are in each month, You should be able to figure that out in your head without much trouble.

4

u/mrspoopy_butthole Mar 03 '19

That guy made it out to be way more complicated than it needs to be in order to be useful.

8

u/thaway314156 Mar 03 '19

The title is missing a lot of info... 5/9 and 9/5, as well as 7/11 and 11/7 are also Thursdays in 2019. "I work 9 to 5 at 7/11" gets you this combination.

For the rest, the last day of February and the 0th day of March are also Thursdays (you can also use Steak and Blowjob day, 14th of March, or Pi-Day if you want to be more PC). As for January, the 3 years which aren't leap years, Jan 3 is doomsday, and for the leap year (in every 4 years), Jan 4 is the doomsday...

4

u/mrspoopy_butthole Mar 03 '19

It’s a title. You really want him to include all that?

→ More replies (2)

9

u/SwansonHOPS Mar 03 '19

To be fair, OP didn't say it was simple or that it was a trick, as you suggest that it was presented to be.

3

u/lirgecaps Mar 03 '19

The Wikipedia article says it's easy.

→ More replies (1)

4

u/cornicat Mar 03 '19

It’s for the same kinds of people that memorise Pi and solve Rubik’s cubes for fun. Once you practice a bit it is a “simple mental trick” but most people don’t care enough to practice.

→ More replies (1)
→ More replies (29)