Skip to content

Commit

Permalink
Fixup: Review suggestion from gibson042
Browse files Browse the repository at this point in the history
  • Loading branch information
anba committed Oct 31, 2024
1 parent 6d7452a commit 03ddef5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -32589,7 +32589,12 @@ <h1>Time Values and Time Range</h1>
<p>Time values do not account for UTC leap seconds—there are no time values representing instants within positive leap seconds, and there are time values representing instants removed from the UTC timeline by negative leap seconds. However, the definition of time values nonetheless yields piecewise alignment with UTC, with discontinuities only at leap second boundaries and zero difference outside of leap seconds.</p>
<p>A Number can exactly represent all integers from -9,007,199,254,740,992 to 9,007,199,254,740,992 (<emu-xref href="#sec-number.min_safe_integer"></emu-xref> and <emu-xref href="#sec-number.max_safe_integer"></emu-xref>). 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.</p>
<p>The exact moment of midnight at the beginning of 1 January 1970 UTC is represented by the time value *+0*<sub>𝔽</sub>.</p>
<p>An ECMAScript <dfn variants="local-offset time values">local-offset time value</dfn> is a time value adjusted by a time zone offset. Time zone offsets are integers in the exclusive range -86,400,000 to 86,400,000.</p>
<p>An ECMAScript <dfn variants="local-offset time values">local-offset time value</dfn> is a time value adjusted by a time zone offset that is an integer number of milliseconds in the interval from -86,400,000 (exclusive) to 86,400,000 (exclusive). A local-offset time value represents a local date and time of day, specifically the UTC date and time of day corresponding an identical time value, ignoring range limits. For example, a local-offset time value of *60000*<sub>𝔽</sub> represents time of day 00:01 on 1 January 1970, and could equivalently come from any of the following:</p>
<ul>
<li>local offset +00:00 = *+0*<sub>𝔽</sub> at epoch time 1970-01-01T00:01Z = *60000*<sub>𝔽</sub></li>
<li>local offset +01:00 = *3600000*<sub>𝔽</sub> at epoch time 1969-12-31T23:01Z = 𝔽(-msPerHour + 60000) = *-3540000*<sub>𝔽</sub></li>
<li>local offset -05:00 = 𝔽(-5 × msPerHour) = *-18000000*<sub>𝔽</sub> at epoch time 1970-01-01T05:01Z = 𝔽(5 × msPerHour + 60000) = *18060000*<sub>𝔽</sub></li>
</ul>
<emu-note>
<p>In the proleptic Gregorian calendar, leap years are precisely those which are both divisible by 4 and either divisible by 400 or not divisible by 100.</p>
<p>The 400 year cycle of the proleptic Gregorian calendar contains 97 leap years. This yields an average of 365.2425 days per year, which is 31,556,952,000 milliseconds. Therefore, the maximum range a Number could represent exactly with millisecond precision is approximately -285,426 to 285,426 years relative to 1970. The smaller range supported by a time value as specified in this section is approximately -273,790 to 273,790 years relative to 1970.</p>
Expand Down

0 comments on commit 03ddef5

Please sign in to comment.