Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -34069,7 +34069,7 @@ <h1>Overview of Date Objects and Definitions of Abstract Operations</h1>
<emu-clause id="sec-time-values-and-time-range">
<h1>Time Values and Time Range</h1>
<p>Time measurement in ECMAScript is analogous to time measurement in POSIX, in particular sharing definition in terms of the proleptic Gregorian calendar, an <dfn id="epoch">epoch</dfn> of midnight at the beginning of 1 January 1970 UTC, and an accounting of every day as comprising exactly 86,400 seconds (each of which is 1000 milliseconds long).</p>
<p>An ECMAScript <dfn variants="time values">time value</dfn> is a Number, either a finite integral Number representing an instant in time to millisecond precision or *NaN* representing no specific instant. A time value that is a multiple of <emu-eqn>24 × 60 × 60 × 1000 = 86,400,000</emu-eqn> (i.e., is 86,400,000 × _d_ for some integer _d_) represents the instant at the start of the UTC day that follows the epoch by _d_ whole UTC days (preceding the epoch for negative _d_). Every other finite time value _tv_ is defined relative to the greatest preceding time value _s_ that is such a multiple, and represents the instant that occurs within the same UTC day as _s_ but follows it by (_tv_ - _s_) milliseconds.</p>
<p>An ECMAScript <dfn variants="time values">time value</dfn> is a Number, either a finite integral Number representing an instant in time to millisecond precision or *NaN* representing no specific instant. A time value that is an integer multiple of msPerDay (i.e., is msPerDay × _d_ for some integer _d_) represents the instant at the start of the UTC day that follows the epoch by _d_ whole UTC days (preceding the epoch for negative _d_). Every other finite time value _tv_ is defined relative to the greatest preceding time value _s_ that is such a multiple, and represents the instant that occurs within the same UTC day as _s_ but follows it by (_tv_ - _s_) milliseconds.</p>
<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>
Expand All @@ -34089,6 +34089,9 @@ <h1>Time-related Constants</h1>
<emu-eqn id="eqn-msPerMinute" aoid="msPerMinute">msPerMinute = *60000*<sub>𝔽</sub> = msPerSecond × 𝔽(SecondsPerMinute)</emu-eqn>
<emu-eqn id="eqn-msPerHour" aoid="msPerHour">msPerHour = *3600000*<sub>𝔽</sub> = msPerMinute × 𝔽(MinutesPerHour)</emu-eqn>
<emu-eqn id="eqn-msPerDay" aoid="msPerDay">msPerDay = *86400000*<sub>𝔽</sub> = msPerHour × 𝔽(HoursPerDay)</emu-eqn>
<emu-eqn id="eqn-nsPerSecond" aoid="nsPerSecond">nsPerSecond = 10<sup>6</sup> × ℝ(msPerSecond) = 10<sup>9</sup></emu-eqn>
<emu-eqn id="eqn-nsPerMillisecond" aoid="nsPerMillisecond">nsPerMillisecond = 10<sup>6</sup></emu-eqn>
<emu-eqn id="eqn-nsPerMicrosecond" aoid="nsPerMicrosecond">nsPerMicrosecond = 10<sup>3</sup></emu-eqn>
</emu-clause>

<emu-clause id="sec-day" type="abstract operation" oldids="eqn-Day,sec-day-number-and-time-within-day">
Expand Down Expand Up @@ -34377,7 +34380,7 @@ <h1>
1. Let _time_ be MakeTime(𝔽(_hour_), 𝔽(_minute_), 𝔽(_second_), 𝔽(_millisecond_)).
1. Let _ms_ be MakeDate(_date_, _time_).
1. Assert: _ms_ is an integral Number.
1. Return ℤ(ℝ(_ms_) × 10<sup>6</sup> + _microsecond_ × 10<sup>3</sup> + _nanosecond_).
1. Return ℤ(ℝ(_ms_) × nsPerMillisecond + _microsecond_ × nsPerMicrosecond + _nanosecond_).

Check warning on line 34383 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in GetUTCEpochNanoseconds cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -34568,8 +34571,8 @@ <h1>
1. If IsTimeZoneOffsetString(_systemTimeZoneIdentifier_) is *true*, then
1. Let _offsetNs_ be ParseTimeZoneOffsetString(_systemTimeZoneIdentifier_).
1. Else,
1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, ℤ(ℝ(_tv_) × 10<sup>6</sup>)).
1. Let _offsetMs_ be truncate(_offsetNs_ / 10<sup>6</sup>).
1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, ℤ(ℝ(_tv_) × nsPerMillisecond)).

Check warning on line 34574 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in LocalTime cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
1. Let _offsetMs_ be truncate(_offsetNs_ / nsPerMillisecond).

Check warning on line 34575 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in LocalTime cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
1. Return _tv_ + 𝔽(_offsetMs_).
</emu-alg>
<emu-note>
Expand Down Expand Up @@ -34612,7 +34615,7 @@ <h1>
1. [declared="tBefore"] Let _possibleInstantsBefore_ be GetNamedTimeZoneEpochNanoseconds(_systemTimeZoneIdentifier_, ℝ(YearFromTime(_tBefore_)), ℝ(MonthFromTime(_tBefore_)) + 1, ℝ(DateFromTime(_tBefore_)), ℝ(HourFromTime(_tBefore_)), ℝ(MinFromTime(_tBefore_)), ℝ(SecFromTime(_tBefore_)), ℝ(msFromTime(_tBefore_)), 0, 0), where _tBefore_ is the largest integral Number &lt; _t_ for which _possibleInstantsBefore_ is not empty (i.e., _tBefore_ represents the last local time before the transition).
1. Let _disambiguatedInstant_ be the last element of _possibleInstantsBefore_.
1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, _disambiguatedInstant_).
1. Let _offsetMs_ be truncate(_offsetNs_ / 10<sup>6</sup>).
1. Let _offsetMs_ be truncate(_offsetNs_ / nsPerMillisecond).

Check warning on line 34618 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in UTC cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
1. Return _t_ - 𝔽(_offsetMs_).
</emu-alg>
<p>
Expand Down Expand Up @@ -35022,7 +35025,7 @@ <h1>
1. Let _fraction_ be the string-concatenation of CodePointsToString(_parsedFraction_) and *"000000000"*.
1. Let _nanosecondsString_ be the substring of _fraction_ from 1 to 10.
1. Let _nanoseconds_ be ℝ(StringToNumber(_nanosecondsString_)).
1. Return _sign_ × (((_hours_ × 60 + _minutes_) × 60 + _seconds_) × 10<sup>9</sup> + _nanoseconds_).
1. Return _sign_ × (((_hours_ × MinutesPerHour + _minutes_) × SecondsPerMinute + _seconds_) × nsPerSecond + _nanoseconds_).

Check warning on line 35028 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in ParseTimeZoneOffsetString cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -35995,8 +35998,8 @@ <h1>
1. If IsTimeZoneOffsetString(_systemTimeZoneIdentifier_) is *true*, then
1. Let _offsetNs_ be ParseTimeZoneOffsetString(_systemTimeZoneIdentifier_).
1. Else,
1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, ℤ(ℝ(_tv_) × 10<sup>6</sup>)).
1. Let _offset_ be 𝔽(truncate(_offsetNs_ / 10<sup>6</sup>)).
1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, ℤ(ℝ(_tv_) × nsPerMillisecond)).

Check warning on line 36001 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in TimeZoneString cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
1. Let _offset_ be 𝔽(truncate(_offsetNs_ / nsPerMillisecond)).

Check warning on line 36002 in spec.html

View workflow job for this annotation

GitHub Actions / esmeta yet phrases detection

Newly Introduced Unknown Step

This step in TimeZoneString cannot be understood by ESMeta. Type check for this algorithm will not be performed after this line.
1. If _offset_ is *+0*<sub>𝔽</sub> or _offset_ > *+0*<sub>𝔽</sub>, then
1. Let _offsetSign_ be *"+"*.
1. Let _absOffset_ be _offset_.
Expand Down
Loading