Skip to content

What is the largest value supported by this library given in Unix time? #3407

Answered by fturmel
kbakdev asked this question in General
Discussion options

You must be logged in to vote

Everything is built on top of the native Date, so you can look up the specs for details. Timestamps are milliseconds since epoch.

A Number can exactly represent all integers from -9,007,199,254,740,992 to 9,007,199,254,740,992 (21.1.2.8 and 21.1.2.6). A time value supports a slightly smaller range of -8,640,000,000,000,000 to 8,640,000,000,000,000 milliseconds. This yields a supported time value range of exactly -100,000,000 days to 100,000,000 days relative to midnight at the beginning of 1 January 1970 UTC.

https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kbakdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3385 on May 03, 2023 14:53.