4 ms·
It's a good lesson - and the really proper take-away is to reject NIH tendencies and just use something like tzdatabase or language functions - your 400 year ex
by munk-a 3y ago
It's a good lesson - and the really proper take-away is to reject NIH tendencies and just use something like tzdatabase or language functions - your 400 year example isn't comprehensive - there are a series of exceptions beyond the 400 year one and, the best bit, they may be revised without warning. Use a library - let someone dedicated to the problem handle it.
- garaetjjte 3y ago>there are a series of exceptions beyond the 400 year one There are none, calendar repeats every 400 years.
- munk-a 3y agoYou are incorrect because the solution to leap years is approximate - we'll need to actually remove leap days on years that are multiples of 3200 and that won't even make things perfect. Time is more complicated than you assume - and if you program this yourself be prepared to also get messed up by leap seconds which are used to account for earth's rotation varying over time.