Hacker News new | past | comments | ask | show | jobs | submit login
Calculate the weekday of any past or future date within seconds (whattheday.com)
6 points by kiledal 5 months ago | hide | past | favorite | 9 comments



I made a website for teaching you how to calculate the weekday of any past or future date within seconds.

Whattheday.com explains how the Doomsday algorithm, invented by John Conway, works and how you can apply it to convert any date to a weekday. It gives access to mini games for improving your speed and accuracy and keep track of your progress as you learn. It's not easy at first, but by playing these games you will soon have a quirky skill for life.


Is there a part of your site that actually does the teaching? I'm not finding it.

There's a weird section asking for my birthday (creepy) but I couldn't get over it saying January 1st 2024 was both a Sunday and a Monday at the same time.


An issue related to incorrect handling of time zones has been fixed just now. The issue here was related to not always using date.getUTCDay() and date.getUTCDate(). Very annoying issue that I wouldn't have spotted if it wasn't reported given that I sit in UTC+0 myself. Sorry for the inconvenience caused, and again thanks for reporting.


Why does it need a sign in?


In order to track your progress of the practice modules and to provide you with statistics for accuracy and speed through the main "play" module. If not interested in this, you don't need to sign in.


This is cool, I was looking for something like this! What is the best place to report issues? Is there a git repository? It looks like the "weekday-number" game is broken: https://whattheday.com/practice/weekday-number (I am entering the answers that are just under it and it says wrong every time).


The Git repository is private for now, might open it up soon.

An issue related to incorrect handling of time zones has been fixed just now. The issue here was related to not always using date.getUTCDay() and date.getUTCDate(). Very annoying issue that I wouldn't have spotted if it wasn't reported given that I sit in UTC+0 myself. Sorry for the inconvenience caused, and again thanks for reporting.


For January and February dates, the 'Memorable date' is adjusted based on whether it's a leap year or not. Would it be easier to pretend that they are part of the previous year, by subtracting 1 from the year whenever the month is January and February? That way the check for leap years is baked into the calculation you're already doing based on the year.


My (now deceased) cognitively disabled aunt had the mind of maybe a second grader, but she could tell you what day of the week your birthday was on in any year. We had no idea how she knew it. Early access to the site? :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: