4 ms·
At some point you will need to calculate how many leap years to account for and whether or not a leap second was introduced in between two arbitrary times. Tim
by 9wzYQbTYsAIc 4y ago
At some point you will need to calculate how many leap years to account for and whether or not a leap second was introduced in between two arbitrary times.
Time libraries can help you with that.
- forty 4y agoExactly there is the same problem, to a lesser extend, when adding/subtracting years which is not trivial to do properly.
- 9wzYQbTYsAIc 4y agoLet alone determining requirements for thresholds. This discussion reminds me of this bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1715455 https://bugzilla.mozilla.org/show_bug.cgi?id=1715455
- ponyous 4y agoWhy can’t you use Date.getFullYear with setFullYear?