From bd5b733829b5a1e3fd04733bb1078da1978ef1d6 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Mon, 21 Mar 2022 17:30:39 -0700 Subject: [PATCH] Editorial: Fix number types in GetISOPartsFromEpoch Also add structured header, while we're at it. --- spec/timezone.html | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/spec/timezone.html b/spec/timezone.html index 4f1e2624b4..57cfa69f60 100644 --- a/spec/timezone.html +++ b/spec/timezone.html @@ -424,22 +424,26 @@

CreateTemporalTimeZone ( _identifier_ [ , _newTarget_ ] )

- -

GetISOPartsFromEpoch ( _epochNanoseconds_ )

-

- The abstract operation GetISOPartsFromEpoch returns the components of a date corresponding to the given number of nanoseconds since the Unix epoch in UTC. -

+ +

+ GetISOPartsFromEpoch ( + _epochNanoseconds_: an integer, + ) +

+
+
description
+
It returns the components of a date corresponding to the given number of nanoseconds since the Unix epoch in UTC.
+
- 1. Assert: _epochNanoseconds_ is an integer. 1. Let _remainderNs_ be _epochNanoseconds_ modulo 106. - 1. Let _epochMilliseconds_ be (_epochNanoseconds_ − _remainderNs_) / 106. - 1. Let _year_ be ! YearFromTime(_epochMilliseconds_). - 1. Let _month_ be ! MonthFromTime(_epochMilliseconds_) + 1. - 1. Let _day_ be ! DateFromTime(_epochMilliseconds_). - 1. Let _hour_ be ! HourFromTime(_epochMilliseconds_). - 1. Let _minute_ be ! MinFromTime(_epochMilliseconds_). - 1. Let _second_ be ! SecFromTime(_epochMilliseconds_). - 1. Let _millisecond_ be ! msFromTime(_epochMilliseconds_). + 1. Let _epochMilliseconds_ be 𝔽((_epochNanoseconds_ − _remainderNs_) / 106). + 1. Let _year_ be ℝ(! YearFromTime(_epochMilliseconds_)). + 1. Let _month_ be ℝ(! MonthFromTime(_epochMilliseconds_)) + 1. + 1. Let _day_ be ℝ(! DateFromTime(_epochMilliseconds_)). + 1. Let _hour_ be ℝ(! HourFromTime(_epochMilliseconds_)). + 1. Let _minute_ be ℝ(! MinFromTime(_epochMilliseconds_)). + 1. Let _second_ be ℝ(! SecFromTime(_epochMilliseconds_)). + 1. Let _millisecond_ be ℝ(! msFromTime(_epochMilliseconds_)). 1. Let _microsecond_ be floor(_remainderNs_ / 1000) modulo 1000. 1. Let _nanosecond_ be _remainderNs_ modulo 1000. 1. Return the Record {