4 ms·
That's really neat. I'm tracking with how you are getting everything but the year offset. Could you explain where that's from? (E.g. why is 2016 +1 and 2014 -1?
by fnayr 10y ago
That's really neat. I'm tracking with how you are getting everything but the year offset. Could you explain where that's from? (E.g. why is 2016 +1 and 2014 -1?) Is it just determined by anchoring at Thursday Jan 1st for 2015, and every year before/after moves the day back/forward one (adjusting for leap years)?
- Artlav 10y agoDon't have a good way to figure it out for an arbitrary year. The year's offset is 0 when jan 1st is a thursday (since the whole system is based on determining the day's offset wrt a thursday), i.e. 1998, 2004, 2009, 2015, and increase every year by 1 and every mod 4=0 year by another 1. If you remember the offsets for a few years, then it's quite straightforward to get the offset for a nearby one. But i can't quickly determine the offset of an arbitrary distant year.