3 ms·
for the others curious, seems javascript handles dates with 64-bit floating points, which have a maximum of 9007199254740991. The highest date I could make wit
by spencermountain 10y ago
for the others curious, seems javascript handles dates with 64-bit floating points, which have a maximum of 9007199254740991.
The highest date I could make with node+chrome was 'Dec 31 275759', which cozies-up pretty close to that (8639977899599000)
- jamescgrant 10y agoI wanted to figure out the importance of that value you found, so I went and did some further research. It turns out the greatest date you can create in Javascript is Date(8640000000000000). Interesting! From the ECMAScript Spec [1]: The actual range of times supported by ECMAScript Date objects is slightly smaller: exactly –100,000,000 days to 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. This gives a range of 8,640,000,000,000,000 milliseconds to either side of 01 January, 1970 UTC. [1] http://ecma-international.org/ecma-262/5.1/#sec-15.9.1.1 http://ecma-international.org/ecma-262/5.1/#sec-15.9.1.1