5 ms·
There's a very quick way to figure out the day of the week for a given date (dd/mm/yyyy) using Zeller's Congruence[0]. By figuring out the day of the week for t
by chris_overseas 5y ago
There's a very quick way to figure out the day of the week for a given date (dd/mm/yyyy) using Zeller's Congruence[0]. By figuring out the day of the week for the first of the month and knowing how many days in the month (with an allowance for leap years), it's easy to then calculate the number of Thursdays.
[0] https://en.wikipedia.org/wiki/Zeller%27s_congruence https://en.wikipedia.org/wiki/Zeller%27s_congruence