From be41cc88cf7f45f439542f301c66e87d11b78b35 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Fri, 13 Nov 2020 15:31:16 -0800 Subject: [PATCH] Rename PlainTime and PlainDateTime internal time slots to ISO See: #522 --- spec/instant.html | 2 +- spec/plaindate.html | 6 ++-- spec/plaindatetime.html | 74 +++++++++++++++++++------------------- spec/plaintime.html | 78 ++++++++++++++++++++--------------------- spec/temporal.html | 2 +- spec/zoneddatetime.html | 26 +++++++------- 6 files changed, 94 insertions(+), 94 deletions(-) diff --git a/spec/instant.html b/spec/instant.html index 2df169badc..c7b7a6bc19 100644 --- a/spec/instant.html +++ b/spec/instant.html @@ -670,7 +670,7 @@

TemporalInstantToString ( _instant_, _timeZone_, _precision_ )

1. Set _outputTimeZone_ to ? CreateTemporalTimeZone(*"UTC"*). 1. Let _isoCalendar_ be ? GetISO8601Calendar(). 1. Let _dateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_, _isoCalendar_). - 1. Let _dateTimeString_ be ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]], *undefined*, _precision_, *"never"*). + 1. Let _dateTimeString_ be ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], *undefined*, _precision_, *"never"*). 1. If _timeZone_ is *undefined*, then 1. Let _timeZoneString_ be *"Z"*. 1. Else, diff --git a/spec/plaindate.html b/spec/plaindate.html index cea6731888..7811cc7e2a 100644 --- a/spec/plaindate.html +++ b/spec/plaindate.html @@ -534,8 +534,8 @@

Temporal.PlainDate.prototype.toPlainDateTime ( [ _temporalTime_ ] )

1. Return ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], 0, 0, 0, 0, 0, 0, _temporalDate_.[[Calendar]]). 1. Set _temporalTime_ to ? ToTemporalTime(_temporalTime_). 1. Return ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], - _temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], - _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], + _temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], + _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _temporalDate_.[[Calendar]]). @@ -565,7 +565,7 @@

Temporal.PlainDate.prototype.toZonedDateTime ( _item_ )

1. Let _temporalDateTime_ be ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], 0, 0, 0, 0, 0, 0, _temporalDate_.[[Calendar]]). 1. Else, 1. Set _temporalTime_ to ? ToTemporalTime(_temporalTime_). - 1. Let _temporalDateTime_ be ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], _temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _temporalDate_.[[Calendar]]). + 1. Let _temporalDateTime_ be ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], _temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _temporalDate_.[[Calendar]]). 1. Let _instant_ be ? GetTemporalInstantFor(_timeZone_, _temporalDateTime_, *"compatible"*). 1. Return ? CreateTemporalZonedDateTime(_instant_.[[Nanoseconds]], _timeZone_, _temporalDate_.[[Calendar]]). diff --git a/spec/plaindatetime.html b/spec/plaindatetime.html index d8ebaff218..5ed6f48847 100644 --- a/spec/plaindatetime.html +++ b/spec/plaindatetime.html @@ -79,7 +79,7 @@

Temporal.PlainDateTime.from ( _item_ [ , _options_ ] )

1. Set _options_ to ? NormalizeOptionsObject(_options_). 1. Let _overflow_ be ? ToTemporalOverflow(_options_). 1. If Type(_item_) is Object and _item_ has an [[InitializedTemporalDateTime]] internal slot, then - 1. Return ? CreateTemporalDateTimeFromStatic(_constructor_, _item_.[[ISOYear]], _item_.[[ISOMonth]], _item_.[[ISODay]], _item_.[[Hour]], _item_.[[Minute]], _item_.[[Second]], _item_.[[Millisecond]], _item_.[[Microsecond]], _item_.[[Nanosecond]], _item_.[[Calendar]]). + 1. Return ? CreateTemporalDateTimeFromStatic(_constructor_, _item_.[[ISOYear]], _item_.[[ISOMonth]], _item_.[[ISODay]], _item_.[[ISOHour]], _item_.[[ISOMinute]], _item_.[[ISOSecond]], _item_.[[ISOMillisecond]], _item_.[[ISOMicrosecond]], _item_.[[ISONanosecond]], _item_.[[Calendar]]). 1. Return ? ToTemporalDateTime(_item_, _constructor_, _overflow_). @@ -93,7 +93,7 @@

Temporal.PlainDateTime.compare ( _one_, _two_ )

1. Set _one_ to ? ToTemporalDateTime(_one_). 1. Set _two_ to ? ToTemporalDateTime(_two_). - 1. Let _result_ be ! CompareTemporalDateTime(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _one_.[[Hour]], _one_.[[Minute]], _one_.[[Second]], _one_.[[Millisecond]], _one_.[[Microsecond]], _one_.[[Nanosecond]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]], _two_.[[Hour]], _two_.[[Minute]], _two_.[[Second]], _two_.[[Millisecond]], _two_.[[Microsecond]], _two_.[[Nanosecond]]). + 1. Let _result_ be ! CompareTemporalDateTime(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _one_.[[ISOHour]], _one_.[[ISOMinute]], _one_.[[ISOSecond]], _one_.[[ISOMillisecond]], _one_.[[ISOMicrosecond]], _one_.[[ISONanosecond]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]], _two_.[[ISOHour]], _two_.[[ISOMinute]], _two_.[[ISOSecond]], _two_.[[ISOMillisecond]], _two_.[[ISOMicrosecond]], _two_.[[ISONanosecond]]). 1. If _result_ โ‰  0, then 1. Return ๐”ฝ(_result_). 1. Return ๐”ฝ(? CompareCalendar(_one_.[[Calendar]], _two_.[[Calendar]])). @@ -194,7 +194,7 @@

get Temporal.PlainDateTime.prototype.hour

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return _dateTime_.[[Hour]]. + 1. Return ๐”ฝ(_dateTime_.[[ISOHour]]). @@ -207,7 +207,7 @@

get Temporal.PlainDateTime.prototype.minute

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return _dateTime_.[[Minute]]. + 1. Return ๐”ฝ(_dateTime_.[[ISOMinute]]). @@ -220,7 +220,7 @@

get Temporal.PlainDateTime.prototype.second

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return _dateTime_.[[Second]]. + 1. Return ๐”ฝ(_dateTime_.[[ISOSecond]]). @@ -233,7 +233,7 @@

get Temporal.PlainDateTime.prototype.millisecond

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return _dateTime_.[[Millisecond]]. + 1. Return ๐”ฝ(_dateTime_.[[ISOMillisecond]]). @@ -246,7 +246,7 @@

get Temporal.PlainDateTime.prototype.microsecond

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return _dateTime_.[[Microsecond]]. + 1. Return ๐”ฝ(_dateTime_.[[ISOMicrosecond]]). @@ -259,7 +259,7 @@

get Temporal.PlainDateTime.prototype.nanosecond

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return _dateTime_.[[Nanosecond]]. + 1. Return ๐”ฝ(_dateTime_.[[ISONanosecond]]). @@ -572,7 +572,7 @@

Temporal.PlainDateTime.prototype.round ( _options_ )

1. Let _smallestUnit_ be ? ToSmallestTemporalUnit(_options_, ยซ ยป). 1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"nearest"*). 1. Let _roundingIncrement_ be ? ToTemporalDateTimeRoundingIncrement(_options_, _smallestUnit_). - 1. Let _result_ be ? RoundDateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]], _roundingIncrement_, _smallestUnit_, _roundingMode_). + 1. Let _result_ be ? RoundDateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _roundingIncrement_, _smallestUnit_, _roundingMode_). 1. Return ? CreateTemporalDateTimeFromInstance(_dateTime_, _result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _dateTime_.[[Calendar]]).
@@ -590,12 +590,12 @@

Temporal.PlainDateTime.prototype.equals ( _other_ )

1. If _dateTime_.[[ISOYear]] โ‰  _other_.[[ISOYear]], return *false*. 1. If _dateTime_.[[ISOMonth]] โ‰  _other_.[[ISOMonth]], return *false*. 1. If _dateTime_.[[ISODay]] โ‰  _other_.[[ISODay]], return *false*. - 1. If _dateTime_.[[Hour]] โ‰  _other_.[[Hour]], return *false*. - 1. If _dateTime_.[[Minute]] โ‰  _other_.[[Minute]], return *false*. - 1. If _dateTime_.[[Second]] โ‰  _other_.[[Second]], return *false*. - 1. If _dateTime_.[[Millisecond]] โ‰  _other_.[[Millisecond]], return *false*. - 1. If _dateTime_.[[Microsecond]] โ‰  _other_.[[Microsecond]], return *false*. - 1. If _dateTime_.[[Nanosecond]] โ‰  _other_.[[Nanosecond]], return *false*. + 1. If _dateTime_.[[ISOHour]] โ‰  _other_.[[ISOHour]], return *false*. + 1. If _dateTime_.[[ISOMinute]] โ‰  _other_.[[ISOMinute]], return *false*. + 1. If _dateTime_.[[ISOSecond]] โ‰  _other_.[[ISOSecond]], return *false*. + 1. If _dateTime_.[[ISOMillisecond]] โ‰  _other_.[[ISOMillisecond]], return *false*. + 1. If _dateTime_.[[ISOMicrosecond]] โ‰  _other_.[[ISOMicrosecond]], return *false*. + 1. If _dateTime_.[[ISONanosecond]] โ‰  _other_.[[ISONanosecond]], return *false*. 1. Return ? CalendarEquals(_dateTime_.[[Calendar]], _other_.[[Calendar]]). @@ -613,7 +613,7 @@

Temporal.PlainDateTime.prototype.toString ( [ _options_ ] )

1. Let _precision_ be ? ToSecondsStringPrecision(_options_). 1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"trunc"*). 1. Let _showCalendar_ be ? ToShowCalendarOption(_options_). - 1. Let _result_ be ? RoundDateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_). + 1. Let _result_ be ? RoundDateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_). 1. Return ? TemporalDateTimeToString(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _dateTime_.[[Calendar]], _precision_.[[Precision]], _showCalendar_). @@ -628,7 +628,7 @@

Temporal.PlainDateTime.prototype.toLocaleString ( [ _locales_ [ , _options_ 1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). 1. If the implementation does not include the ECMA-402 Internationalization API, then - 1. Return ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]], _dateTime_.[[Calendar]], *"auto"*, *"auto"*). + 1. Return ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], *"auto"*, *"auto"*). 1. Let _dateFormat_ be ? Construct(%DateTimeFormat%, ยซ _locales_, _options_ ยป). 1. Return ? FormatDateTime(_dateFormat_, _dateTime_). @@ -642,7 +642,7 @@

Temporal.PlainDateTime.prototype.toJSON ( )

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]], _dateTime_.[[Calendar]], *"auto"*, *"auto"*). + 1. Return ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], *"auto"*, *"auto"*). @@ -723,7 +723,7 @@

Temporal.PlainDateTime.prototype.toPlainTime ( )

1. Let _dateTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). - 1. Return ? CreateTemporalTime(_dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]]). + 1. Return ? CreateTemporalTime(_dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]]). @@ -753,14 +753,14 @@

Temporal.PlainDateTime.prototype.getISOFields ( )

1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]). 1. Let _fields_ be ? ObjectCreate(%ObjectPrototype%). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"calendar"*, _dateTime_.[[Calendar]]). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"hour"*, ๐”ฝ(_dateTime_.[[Hour]])). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"hour"*, ๐”ฝ(_dateTime_.[[ISOHour]])). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoDay"*, ๐”ฝ(_dateTime_.[[ISODay]])). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMonth"*, ๐”ฝ(_dateTime_.[[ISOMonth]])). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoYear"*, ๐”ฝ(_dateTime_.[[ISOYear]])). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"microsecond"*, ๐”ฝ(_dateTime_.[[Microsecond]])). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"millisecond"*, ๐”ฝ(_dateTime_.[[Millisecond]])). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"minute"*, ๐”ฝ(_dateTime_.[[Minute]])). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"nanosecond"*, ๐”ฝ(_dateTime_.[[Nanosecond]])). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"microsecond"*, ๐”ฝ(_dateTime_.[[ISOMicrosecond]])). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"millisecond"*, ๐”ฝ(_dateTime_.[[ISOMillisecond]])). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"minute"*, ๐”ฝ(_dateTime_.[[ISOMinute]])). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"nanosecond"*, ๐”ฝ(_dateTime_.[[ISONanosecond]])). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"second"*, ๐”ฝ(_dateTime_.[[Second]])). 1. Return _fields_. @@ -818,7 +818,7 @@

Properties of Temporal.PlainDateTime Instances

- [[Hour]] + [[ISOHour]] An integer Number value between 0 and 23, inclusive, representing the hour of the day. @@ -826,7 +826,7 @@

Properties of Temporal.PlainDateTime Instances

- [[Minute]] + [[ISOMinute]] An integer Number value between 0 and 59, inclusive, representing the minute of the hour. @@ -834,7 +834,7 @@

Properties of Temporal.PlainDateTime Instances

- [[Second]] + [[ISOSecond]] An integer Number value between 0 and 59, inclusive, representing the second within the minute. @@ -842,7 +842,7 @@

Properties of Temporal.PlainDateTime Instances

- [[Millisecond]] + [[ISOMillisecond]] An integer Number value between 0 and 999, inclusive, representing the millisecond within the second. @@ -850,7 +850,7 @@

Properties of Temporal.PlainDateTime Instances

- [[Microsecond]] + [[ISOMicrosecond]] An integer Number value between 0 and 999, inclusive, representing the microsecond within the millisecond. @@ -858,7 +858,7 @@

Properties of Temporal.PlainDateTime Instances

- [[Nanosecond]] + [[ISONanosecond]] An integer Number value between 0 and 999, inclusive, representing the nanosecond within the microsecond. @@ -1077,16 +1077,16 @@

CreateTemporalDateTime ( _isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, 1. If ! DateTimeWithinLimits(_isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is not ~in range~, then 1. Throw a *RangeError* exception. 1. If _newTarget_ is not given, set it to %Temporal.PlainDateTime%. - 1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.PlainDateTime.prototype%"*, ยซ [[InitializedTemporalDateTime]], [[ISOYear]], [[ISOMonth]], [[ISODay]], [[Hour]], [[Minute]], [[Second]], [[Millisecond]], [[Microsecond]], [[Nanosecond]], [[Calendar]] ยป). + 1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.PlainDateTime.prototype%"*, ยซ [[InitializedTemporalDateTime]], [[ISOYear]], [[ISOMonth]], [[ISODay]], [[ISOHour]], [[ISOMinute]], [[ISOSecond]], [[ISOMillisecond]], [[ISOMicrosecond]], [[ISONanosecond]], [[Calendar]] ยป). 1. Set _object_.[[ISOYear]] to _isoYear_. 1. Set _object_.[[ISOMonth]] to _isoMonth_. 1. Set _object_.[[ISODay]] to _isoDay_. - 1. Set _object_.[[Hour]] to _hour_. - 1. Set _object_.[[Minute]] to _minute_. - 1. Set _object_.[[Second]] to _second_. - 1. Set _object_.[[Millisecond]] to _millisecond_. - 1. Set _object_.[[Microsecond]] to _microsecond_. - 1. Set _object_.[[Nanosecond]] to _nanosecond_. + 1. Set _object_.[[ISOHour]] to _hour_. + 1. Set _object_.[[ISOMinute]] to _minute_. + 1. Set _object_.[[ISOSecond]] to _second_. + 1. Set _object_.[[ISOMillisecond]] to _millisecond_. + 1. Set _object_.[[ISOMicrosecond]] to _microsecond_. + 1. Set _object_.[[ISONanosecond]] to _nanosecond_. 1. Set _object_.[[Calendar]] to _calendar_. 1. Return _object_. diff --git a/spec/plaintime.html b/spec/plaintime.html index e25adb6a62..0cb4237241 100644 --- a/spec/plaintime.html +++ b/spec/plaintime.html @@ -74,7 +74,7 @@

Temporal.PlainTime.from ( _item_ [ , _options_ ] )

1. Set _options_ to ? NormalizeOptionsObject(_options_). 1. Let _overflow_ be ? ToTemporalOverflow(_options_). 1. If Type(_item_) is Object and _item_ has an [[InitializedTemporalTime]] internal slot, then - 1. Return ? CreateTemporalTimeFromStatic(_constructor_, _item_.[[Hour]], _item_.[[Minute]], _item_.[[Second]], _item_.[[Millisecond]], _item_.[[Microsecond]], _item_.[[Nanosecond]]). + 1. Return ? CreateTemporalTimeFromStatic(_constructor_, _item_.[[ISOHour]], _item_.[[ISOMinute]], _item_.[[ISOSecond]], _item_.[[ISOMillisecond]], _item_.[[ISOMicrosecond]], _item_.[[ISONanosecond]]). 1. Return ? ToTemporalTime(_item_, _constructor_, _overflow_). @@ -88,7 +88,7 @@

Temporal.PlainTime.compare ( _one_, _two_ )

1. Set _one_ to ? ToTemporalTime(_one_). 1. Set _two_ to ? ToTemporalTime(_two_). - 1. Return ๐”ฝ(! CompareTemporalTime(_one_.[[Hour]], _one_.[[Minute]], _one_.[[Second]], _one_.[[Millisecond]], _one_.[[Microsecond]], _one_.[[Nanosecond]], _two_.[[Hour]], _two_.[[Minute]], _two_.[[Second]], _two_.[[Millisecond]], _two_.[[Microsecond]], _two_.[[Nanosecond]])). + 1. Return ๐”ฝ(! CompareTemporalTime(_one_.[[ISOHour]], _one_.[[ISOMinute]], _one_.[[ISOSecond]], _one_.[[ISOMillisecond]], _one_.[[ISOMicrosecond]], _one_.[[ISONanosecond]], _two_.[[ISOHour]], _two_.[[ISOMinute]], _two_.[[ISOSecond]], _two_.[[ISOMillisecond]], _two_.[[ISOMicrosecond]], _two_.[[ISONanosecond]])). @@ -141,7 +141,7 @@

get Temporal.PlainTime.prototype.hour

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ๐”ฝ(_temporalTime_.[[Hour]]). + 1. Return ๐”ฝ(_temporalTime_.[[ISOHour]]). @@ -154,7 +154,7 @@

get Temporal.PlainTime.prototype.minute

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ๐”ฝ(_temporalTime_.[[Minute]]). + 1. Return ๐”ฝ(_temporalTime_.[[ISOMinute]]). @@ -167,7 +167,7 @@

get Temporal.PlainTime.prototype.second

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ๐”ฝ(_temporalTime_.[[Second]]). + 1. Return ๐”ฝ(_temporalTime_.[[ISOSecond]]). @@ -180,7 +180,7 @@

get Temporal.PlainTime.prototype.millisecond

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ๐”ฝ(_temporalTime_.[[Millisecond]]). + 1. Return ๐”ฝ(_temporalTime_.[[ISOMillisecond]]). @@ -193,7 +193,7 @@

get Temporal.PlainTime.prototype.microsecond

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ๐”ฝ(_temporalTime_.[[Microsecond]]). + 1. Return ๐”ฝ(_temporalTime_.[[ISOMicrosecond]]). @@ -206,7 +206,7 @@

get Temporal.PlainTime.prototype.nanosecond

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ๐”ฝ(_temporalTime_.[[Nanosecond]]). + 1. Return ๐”ฝ(_temporalTime_.[[ISONanosecond]]). @@ -223,7 +223,7 @@

Temporal.PlainTime.prototype.add ( _temporalDurationLike_ [ , _options_ ] )< 1. Perform ? RejectDurationSign(_duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _duration_.[[Days]], _duration_.[[Hours]], _duration_.[[Minutes]], _duration_.[[Seconds]], _duration_.[[Milliseconds]], _duration_.[[Microseconds]], _duration_.[[Nanoseconds]]). 1. Set _options_ to ? NormalizeOptionsObject(_options_). 1. Let _overflow_ be ? ToTemporalOverflow(_options_). - 1. Let _result_ be ? AddTime(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _duration_.[[Hours]], _duration_.[[Minutes]], _duration_.[[Seconds]], _duration_.[[Milliseconds]], _duration_.[[Microseconds]], _duration_.[[Nanoseconds]]). + 1. Let _result_ be ? AddTime(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _duration_.[[Hours]], _duration_.[[Minutes]], _duration_.[[Seconds]], _duration_.[[Milliseconds]], _duration_.[[Microseconds]], _duration_.[[Nanoseconds]]). 1. Set _result_ to ? RegulateTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _overflow_). 1. Return ? CreateTemporalTimeFromInstance(_temporalTime_, _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]). @@ -243,7 +243,7 @@

Temporal.PlainTime.prototype.subtract ( _temporalDurationLike_ [ , _options_ 1. Set _options_ to ? NormalizeOptionsObject(_options_). 1. Let _overflow_ be ? ToTemporalOverflow(_options_). 1. Let _sign_ be ! DurationSign(_duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _duration_.[[Days]], _duration_.[[Hours]], _duration_.[[Minutes]], _duration_.[[Seconds]], _duration_.[[Milliseconds]], _duration_.[[Microseconds]], _duration_.[[Nanoseconds]]). - 1. Let _result_ be ? AddTime(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], โˆ’_duration_.[[Hours]], โˆ’_duration_.[[Minutes]], โˆ’_duration_.[[Seconds]], โˆ’_duration_.[[Milliseconds]], โˆ’_duration_.[[Microseconds]], โˆ’_duration_.[[Nanoseconds]]). + 1. Let _result_ be ? AddTime(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], โˆ’_duration_.[[Hours]], โˆ’_duration_.[[Minutes]], โˆ’_duration_.[[Seconds]], โˆ’_duration_.[[Milliseconds]], โˆ’_duration_.[[Microseconds]], โˆ’_duration_.[[Nanoseconds]]). 1. Set _result_ to ? RegulateTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _overflow_). 1. Return ? CreateTemporalTimeFromInstance(_temporalTime_, _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]). @@ -316,7 +316,7 @@

Temporal.PlainTime.prototype.until ( _other_ [ , _options_ ] )

1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"trunc"*). 1. Let _maximum_ be ! MaximumTemporalDurationRoundingIncrement(_smallestUnit_). 1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*). - 1. Let _result_ be ! DifferenceTime(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _other_.[[Hour]], _other_.[[Minute]], _other_.[[Second]], _other_.[[Millisecond]], _other_.[[Microsecond]], _other_.[[Nanosecond]]). + 1. Let _result_ be ! DifferenceTime(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _other_.[[ISOHour]], _other_.[[ISOMinute]], _other_.[[ISOSecond]], _other_.[[ISOMillisecond]], _other_.[[ISOMicrosecond]], _other_.[[ISONanosecond]]). 1. Set _result_ to ? RoundDuration(0, 0, 0, 0, _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_). 1. Set _result_ to ! BalanceDuration(0, _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]], _largestUnit_). 1. Return ? CreateTemporalDuration(0, 0, 0, 0, _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]]). @@ -341,7 +341,7 @@

Temporal.PlainTime.prototype.since ( _other_ [ , _options_ ] )

1. Set _roundingMode_ to ! NegateTemporalRoundingMode(_roundingMode_). 1. Let _maximum_ be ! MaximumTemporalDurationRoundingIncrement(_smallestUnit_). 1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*). - 1. Let _result_ be ! DifferenceTime(_other_.[[Hour]], _other_.[[Minute]], _other_.[[Second]], _other_.[[Millisecond]], _other_.[[Microsecond]], _other_.[[Nanosecond]], _temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]]). + 1. Let _result_ be ! DifferenceTime(_other_.[[ISOHour]], _other_.[[ISOMinute]], _other_.[[ISOSecond]], _other_.[[ISOMillisecond]], _other_.[[ISOMicrosecond]], _other_.[[ISONanosecond]], _temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]]). 1. Set _result_ to ? RoundDuration(0, 0, 0, 0, โˆ’_result_.[[Hours]], โˆ’_result_.[[Minutes]], โˆ’_result_.[[Seconds]], โˆ’_result_.[[Milliseconds]], โˆ’_result_.[[Microseconds]], โˆ’_result_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_). 1. Set _result_ to ! BalanceDuration(0, โˆ’_result_.[[Hours]], โˆ’_result_.[[Minutes]], โˆ’_result_.[[Seconds]], โˆ’_result_.[[Milliseconds]], โˆ’_result_.[[Microseconds]], โˆ’_result_.[[Nanoseconds]], _largestUnit_). 1. Return ? CreateTemporalDuration(0, 0, 0, 0, _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]]). @@ -369,7 +369,7 @@

Temporal.PlainTime.prototype.round ( _options_ )

1. Else, 1. Let _maximum_ be 1000. 1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*). - 1. Let _result_ be ? RoundTime(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _roundingIncrement_, _smallestUnit_, _roundingMode_). + 1. Let _result_ be ? RoundTime(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _roundingIncrement_, _smallestUnit_, _roundingMode_). 1. Return ? CreateTemporalTimeFromInstance(_temporalTime_, _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]). @@ -384,12 +384,12 @@

Temporal.PlainTime.prototype.equals ( _other_ )

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). 1. Set _other_ to ? ToTemporalTime(_other_). - 1. If _temporalTime_.[[Hour]] โ‰  _other_.[[Hour]], return *false*. - 1. If _temporalTime_.[[Minute]] โ‰  _other_.[[Minute]], return *false*. - 1. If _temporalTime_.[[Second]] โ‰  _other_.[[Second]], return *false*. - 1. If _temporalTime_.[[Millisecond]] โ‰  _other_.[[Millisecond]], return *false*. - 1. If _temporalTime_.[[Microsecond]] โ‰  _other_.[[Microsecond]], return *false*. - 1. If _temporalTime_.[[Nanosecond]] โ‰  _other_.[[Nanosecond]], return *false*. + 1. If _temporalTime_.[[ISOHour]] โ‰  _other_.[[ISOHour]], return *false*. + 1. If _temporalTime_.[[ISOMinute]] โ‰  _other_.[[ISOMinute]], return *false*. + 1. If _temporalTime_.[[ISOSecond]] โ‰  _other_.[[ISOSecond]], return *false*. + 1. If _temporalTime_.[[ISOMillisecond]] โ‰  _other_.[[ISOMillisecond]], return *false*. + 1. If _temporalTime_.[[ISOMicrosecond]] โ‰  _other_.[[ISOMicrosecond]], return *false*. + 1. If _temporalTime_.[[ISONanosecond]] โ‰  _other_.[[ISONanosecond]], return *false*. 1. Return *true*. @@ -404,9 +404,9 @@

Temporal.PlainTime.prototype.toPlainDateTime ( _temporalDate_ )

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). 1. Set _temporalDate_ to ? ToTemporalDate(_temporalDate_). - 1. Return ? CreateTemporalDateTime(_temporalDate_.[[Year]], _temporalDate_.[[Month]], _temporalDate_.[[Day]], - _temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], - _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], + 1. Return ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], + _temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], + _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _temporalDate_.[[Calendar]]). @@ -429,7 +429,7 @@

Temporal.PlainTime.prototype.toZonedDateTime ( _item_ )

1. Throw a *TypeError* exception. 1. Let _timeZone_ be ? ToTemporalTimeZone(_temporalTimeZoneLike_). 1. TODO: verify calendars match. - 1. Let _temporalDateTime_ be ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], _temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _temporalDate_.[[Calendar]]). + 1. Let _temporalDateTime_ be ? CreateTemporalDateTime(_temporalDate_.[[ISOYear]], _temporalDate_.[[ISOMonth]], _temporalDate_.[[ISODay]], _temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _temporalDate_.[[Calendar]]). 1. Let _instant_ be ? GetTemporalInstantFor(_timeZone_, _temporalDateTime_, *"compatible"*). 1. Return ? CreateTemporalZonedDateTime(_instant_.[[Nanoseconds]], _timeZone_, _temporalDate_.[[Calendar]]). @@ -486,7 +486,7 @@

Temporal.PlainTime.prototype.toString ( [ _options_ ] )

1. Set _options_ to ? NormalizeOptionsObject(_options_). 1. Let _precision_ be ? ToSecondsStringPrecision(_options_). 1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"trunc"*). - 1. Let _roundResult_ be ? RoundTime(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_). + 1. Let _roundResult_ be ? RoundTime(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_). 1. Return ? TemporalTimeToString(_roundResult_.[[Hour]], _roundResult_.[[Minute]], _roundResult_.[[Second]], _roundResult_.[[Millisecond]], _roundResult_.[[Microsecond]], _roundResult_.[[Nanosecond]], _temporalTime_.[[Calendar]], _precision_.[[Precision]]). @@ -501,7 +501,7 @@

Temporal.PlainTime.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] 1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). 1. If the implementation does not include the ECMA-402 Internationalization API, then - 1. Return ? TemporalTimeToString(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _temporalTime_.[[Calendar]], *"auto"*, *"auto"*). + 1. Return ? TemporalTimeToString(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _temporalTime_.[[Calendar]], *"auto"*, *"auto"*). 1. Let _dateFormat_ be ? Construct(%DateTimeFormat%, ยซ _locales_, _options_ ยป). 1. Return ? FormatDateTime(_dateFormat_, _temporalTime_). @@ -515,7 +515,7 @@

Temporal.PlainTime.prototype.toJSON ( )

1. Let _temporalTime_ be the *this* value. 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]). - 1. Return ? TemporalTimeToString(_temporalTime_.[[Hour]], _temporalTime_.[[Minute]], _temporalTime_.[[Second]], _temporalTime_.[[Millisecond]], _temporalTime_.[[Microsecond]], _temporalTime_.[[Nanosecond]], _temporalTime_.[[Calendar]], *"auto"*, *"auto"*). + 1. Return ? TemporalTimeToString(_temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]], _temporalTime_.[[Calendar]], *"auto"*, *"auto"*). @@ -557,7 +557,7 @@

Properties of Temporal.PlainTime Instances

- [[Hour]] + [[ISOHour]] An integer between 0 and 23, inclusive, representing the hour of the day. @@ -565,7 +565,7 @@

Properties of Temporal.PlainTime Instances

- [[Minute]] + [[ISOMinute]] An integer between 0 and 59, inclusive, representing the minute of the hour. @@ -573,7 +573,7 @@

Properties of Temporal.PlainTime Instances

- [[Second]] + [[ISOSecond]] An integer between 0 and 59, inclusive, representing the second within the minute. @@ -581,7 +581,7 @@

Properties of Temporal.PlainTime Instances

- [[Millisecond]] + [[ISOMillisecond]] An integer between 0 and 999, inclusive, representing the millisecond within the second. @@ -589,7 +589,7 @@

Properties of Temporal.PlainTime Instances

- [[Microsecond]] + [[ISOMicrosecond]] An integer between 0 and 999, inclusive, representing the microsecond within the millisecond. @@ -597,7 +597,7 @@

Properties of Temporal.PlainTime Instances

- [[Nanosecond]] + [[ISONanosecond]] An integer between 0 and 999, inclusive, representing the nanosecond within the microsecond. @@ -830,13 +830,13 @@

CreateTemporalTime ( _hour_, _minute_, _second_, _millisecond_, _microsecond 1. If ! ValidateTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is *false*, then 1. Throw a *RangeError* exception. 1. If _newTarget_ is not given, set it to %Temporal.PlainTime%. - 1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.PlainTime.prototype%"*, ยซ [[InitializedTemporalTime]], [[Hour]], [[Minute]], [[Second]], [[Millisecond]], [[Microsecond]], [[Nanosecond]] ยป). - 1. Set _object_.[[Hour]] to _hour_. - 1. Set _object_.[[Minute]] to _minute_. - 1. Set _object_.[[Second]] to _second_. - 1. Set _object_.[[Millisecond]] to _millisecond_. - 1. Set _object_.[[Microsecond]] to _microsecond_. - 1. Set _object_.[[Nanosecond]] to _nanosecond_. + 1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.PlainTime.prototype%"*, ยซ [[InitializedTemporalTime]], [[ISOHour]], [[ISOMinute]], [[ISOSecond]], [[ISOMillisecond]], [[ISOMicrosecond]], [[ISONanosecond]] ยป). + 1. Set _object_.[[ISOHour]] to _hour_. + 1. Set _object_.[[ISOMinute]] to _minute_. + 1. Set _object_.[[ISOSecond]] to _second_. + 1. Set _object_.[[ISOMillisecond]] to _millisecond_. + 1. Set _object_.[[ISOMicrosecond]] to _microsecond_. + 1. Set _object_.[[ISONanosecond]] to _nanosecond_. 1. Return _object_. diff --git a/spec/temporal.html b/spec/temporal.html index 618fd03c1d..70e0690788 100644 --- a/spec/temporal.html +++ b/spec/temporal.html @@ -170,7 +170,7 @@

Temporal.now.plainTimeISO ( [ _temporalTimeZoneLike_ ] )

1. Let _dateTime_ be ? SystemDateTime(_temporalTimeZoneLike_). - 1. Return ? CreateTemporalTime(_dateTime_.[[Hour]], _dateTime_.[[Minute]], _dateTime_.[[Second]], _dateTime_.[[Millisecond]], _dateTime_.[[Microsecond]], _dateTime_.[[Nanosecond]]). + 1. Return ? CreateTemporalTime(_dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]]). diff --git a/spec/zoneddatetime.html b/spec/zoneddatetime.html index 7581cca17f..f96cd4bfd9 100644 --- a/spec/zoneddatetime.html +++ b/spec/zoneddatetime.html @@ -217,7 +217,7 @@

get Temporal.ZonedDateTime.prototype.hour

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return _temporalDateTime_.[[Hour]]. + 1. Return ๐”ฝ(_temporalDateTime_.[[ISOHour]]). @@ -233,7 +233,7 @@

get Temporal.ZonedDateTime.prototype.minute

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return _temporalDateTime_.[[Minute]]. + 1. Return ๐”ฝ(_temporalDateTime_.[[ISOMinute]]). @@ -249,7 +249,7 @@

get Temporal.ZonedDateTime.prototype.second

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return _temporalDateTime_.[[Second]]. + 1. Return ๐”ฝ(_temporalDateTime_.[[ISOSecond]]). @@ -265,7 +265,7 @@

get Temporal.ZonedDateTime.prototype.millisecond

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return _temporalDateTime_.[[Millisecond]]. + 1. Return ๐”ฝ(_temporalDateTime_.[[ISOMillisecond]]). @@ -281,7 +281,7 @@

get Temporal.ZonedDateTime.prototype.microsecond

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return _temporalDateTime_.[[Microsecond]]. + 1. Return ๐”ฝ(_temporalDateTime_.[[ISOMicrosecond]]). @@ -297,7 +297,7 @@

get Temporal.ZonedDateTime.prototype.nanosecond

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return _temporalDateTime_.[[Nanosecond]]. + 1. Return ๐”ฝ(_temporalDateTime_.[[ISONanosecond]]). @@ -923,7 +923,7 @@

Temporal.ZonedDateTime.prototype.toPlainTime ( )

1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]]. 1. Let _instant_ be ? CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]). 1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). - 1. Return ? CreateTemporalTime(_temporalDateTime_.[[Hour]], _temporalDateTime_.[[Minute]], _temporalDateTime_.[[Second]], _temporalDateTime_.[[Millisecond]], _temporalDateTime_.[[Microsecond]], _temporalDateTime_.[[Nanosecond]]). + 1. Return ? CreateTemporalTime(_temporalDateTime_.[[ISOHour]], _temporalDateTime_.[[ISOMinute]], _temporalDateTime_.[[ISOSecond]], _temporalDateTime_.[[ISOMillisecond]], _temporalDateTime_.[[ISOMicrosecond]], _temporalDateTime_.[[ISONanosecond]]). @@ -1011,16 +1011,16 @@

Temporal.ZonedDateTime.prototype.getISOFields ( )

1. Let _temporalDateTime_ be ? GetTemporalDateTimeFor(_timeZone_, _instant_). 1. Let _offset_ be ? GetOffsetStringFor(_timeZone_, _instant_). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"calendar"*, _zonedDateTime_.[[Calendar]]). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"hour"*, _dateTime_.[[Hour]]). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"hour"*, _dateTime_.[[ISOHour]]). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoDay"*, _dateTime_.[[ISODay]]). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMonth"*, _dateTime_.[[ISOMonth]]). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoYear"*, _dateTime_.[[ISOYear]]). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"microsecond"*, _dateTime_.[[Microsecond]]). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"millisecond"*, _dateTime_.[[Millisecond]]). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"minute"*, _dateTime_.[[Minute]]). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"nanosecond"*, _dateTime_.[[Nanosecond]]). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"microsecond"*, _dateTime_.[[ISOMicrosecond]]). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"millisecond"*, _dateTime_.[[ISOMillisecond]]). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"minute"*, _dateTime_.[[ISOMinute]]). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"nanosecond"*, _dateTime_.[[ISONanosecond]]). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"offset"*, _offset_). - 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"second"*, _dateTime_.[[Second]]). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"second"*, _dateTime_.[[ISOSecond]]). 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"timeZone"*, _timeZone_). 1. Return _fields_.