You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the ECMAScript 5.1 spec, the maximum possible Date that can be represented in JavaScript is Saturday, September 13th, 275760 @ 00:00:00.000 UTC (midnight), which is exactly 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. (And the minimum is -100,000,000 days.)
The timestamp representation for that is 8640000000000000 (milliseconds since the epoch). While not critically necessary to reject/adjust values higher than that, it might be nice to account for that since it is a pretty arbitrary number between the max signed 32-bit integer and Number.MAX_SAFE_INTEGER.
The text was updated successfully, but these errors were encountered:
The year 275760. If this module is still in use by then, it would surely be a legacy :)
But, even if the world boils off into space to make way for a hyperspace bypass before that time, in the spirit of this module it would make sense to make anything beyond that number work just as well (instead of dropping it), I guess. In any case, we have to do something to guarantee correct (not-undefined) behavior.
I will happily accept PRs to implement this :) Else I may get around to it someday, but I have to admit I'm a bit busy right now, so it may take some time.
I suppose it isn't really an issue with the way you have this module coded since you never try to incorporate the user's provided delay value into a Date object (you just keep it in its millisecond form). 👍
Per the ECMAScript 5.1 spec, the maximum possible
Date
that can be represented in JavaScript is Saturday, September 13th, 275760 @ 00:00:00.000 UTC (midnight), which is exactly 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. (And the minimum is -100,000,000 days.)The timestamp representation for that is
8640000000000000
(milliseconds since the epoch). While not critically necessary to reject/adjust values higher than that, it might be nice to account for that since it is a pretty arbitrary number between the max signed 32-bit integer andNumber.MAX_SAFE_INTEGER
.The text was updated successfully, but these errors were encountered: