Show HN: Weekle – a web app to learn how to calculate the day of the week (benjoffe.com)
Mentally calculating the day-of-the-week for any date in history sounds like an impossible task for a normal person, but the algorithm is actually pretty simple to learn.
Although there are tutorials for this elsewhere online, and little quizzes available, there didn't seem to be anything well optimised with multiple practice modes etc.
I originally created a basic version of this just for myself, but a small group of friends and family found it interesting and gave suggestions such as the daily game.
Multi-lingual support is a bit rudimentary at the moment, it will only translate the month names and weekday names, not other text. If any translation mistakes are identified please let me know.
Other feedback is welcome too.
31 comments
[ 4.7 ms ] story [ 77.3 ms ] threadThe majority of the world uses little endian, so the 8th day of the 10th month of the 2023rd year. 8th October is Sunday, as I know that because it’s the same day as 9th of May.
However experiments E has told me that much of the internet uses the minority American view of “middle endian”
Probably worth making it clear.
Even if it works, I'll probably take your suggestion add a tip below the date to clarify the date format for the user's first session.
Im in the US, Eastern TZ. Defaulted to English international.
Cool web app btw. I like the whole idea. Just a neat little self contained lesson.
All three date formats are used in Weekle when set to Canadian mode, and fully numeric d/m/y or m/d/y dates are only used if the date is >12 to avoid ambiguity.
I recommend only attempting to memorise the table after you are already able to calculate the year number using the normal algorithm.
Nice work on the site!
Silly mnemonics but it's something. The design about even number days all landing on March 0 / last day of Feb is a good and simple one. I don't know what Weekle is innovating -- instead of using an established system of mnemonics and calculations, he just presents his own table with no comments. Maybe his inspiration was to say, "hey guys, I made my own date calculation system" to impress people who don't know about Doomsday?
I don't think that's simpler than the algorithm at weekle, but in case anyone is curious.
[1]: https://firstsundaydoomsday.blogspot.com/2011/01/learn-by-ex...
An adjustment for clock drift[0]?
0 - https://www.historic-uk.com/HistoryUK/HistoryofBritain/Give-...
1/7th is 0.142857 recurring. All you need to remember is one-four-two-eight-five-seven. Say it over and over. It’s my favourite number.
The magic: to get 2/7, 3/7, any/7, just move the decimal point:
- 2/7: 0.285714285714…
- 3/7: 0.428571428571…
- 4/7: 0.571428571428… (I’m typing these out but ‘from memory’ but not really: only by knowing 1-4-2-8-5-7)
- 5/7 & 6/7: left as an exercise for the reader.
So then the trick is to play a bit of mental magic. Pretend like this is really hard and that every decimal point is stretching your mental capacity to its very edge.
31/7? That’s 4, with 3/7 left over. Say it out loud as you gaze in to the middle distance and do this difficult, difficult calculation in your head: “four point four two eight five seven … one four … two eight five … seven one four …” and so on.
A fun trick which is very occasionally practically useful.