Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial improvements #2689

Merged
merged 6 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ <h1>
1. Set _calendar_ to the ASCII-lowercase of _calendar_.
1. If _timeZone_ is *undefined*, then
1. Let _plainDate_ be ? CreateTemporalDate(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _calendar_).
1. Return the Record { [[PlainRelativeTo]]: _plainDate, [[ZonedRelativeTo]]: *undefined* }.
1. Return the Record { [[PlainRelativeTo]]: _plainDate_, [[ZonedRelativeTo]]: *undefined* }.
1. If _offsetBehaviour_ is ~option~, then
1. Let _offsetNs_ be ? ParseDateTimeUTCOffset(_offsetString_).
1. Else,
Expand Down
2 changes: 1 addition & 1 deletion spec/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ <h1>
1. Let _monthCodeInteger_ be ! ToIntegerOrInfinity(_monthCodeDigits_).
1. Assert: SameValue(_monthCode_, ISOMonthCode(_monthCodeInteger_)) is *true*.
1. If _month_ is not *undefined* and ℝ(_month_) ≠ _monthCodeInteger_, throw a *RangeError* exception.
1. Perform ! Set(_fields_, *"month"*, 𝔽(_monthCodeInteger_), *false*).
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"month"*, 𝔽(_monthCodeInteger_)).
1. Return ~unused~.
</emu-alg>
</emu-clause>
Expand Down
2 changes: 1 addition & 1 deletion spec/duration.html
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ <h1>
<h1>
ToTemporalDuration (
_item_: an ECMAScript language value,
)
): either a normal completion containing a Temporal.Duration, or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
Expand Down
2 changes: 1 addition & 1 deletion spec/instant.html
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ <h1>TemporalInstantToString ( _instant_, _timeZone_, _precision_ )</h1>
1. Let _outputTimeZone_ be _timeZone_.
1. If _outputTimeZone_ is *undefined*, set _outputTimeZone_ to *"UTC"*.
1. Let _offsetNanoseconds_ be ? GetOffsetNanosecondsFor(_outputTimeZone_, _instant_).
1. Let _dateTime_ be ? GetPlainDateTimeFor(_outputTimeZone_, _instant_, *"iso8601"*, _offsetNanoseconds_).
1. Let _dateTime_ be ! GetPlainDateTimeFor(_outputTimeZone_, _instant_, *"iso8601"*, _offsetNanoseconds_).
1. Let _dateTimeString_ be ! TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], *"iso8601"*, _precision_, *"never"*).
1. If _timeZone_ is *undefined*, then
1. Let _timeZoneString_ be *"Z"*.
Expand Down
19 changes: 12 additions & 7 deletions spec/plaindate.html
Original file line number Diff line number Diff line change
Expand Up @@ -732,15 +732,20 @@ <h1>
</emu-note>
</emu-clause>

<emu-clause id="sec-temporal-totemporaldate" aoid="ToTemporalDate">
<h1>ToTemporalDate ( _item_ [ , _options_ ] )</h1>
<p>
The abstract operation ToTemporalDate returns its argument _item_ if it is already a Temporal.PlainDate instance, converts _item_ to a new Temporal.PlainDate instance if possible, and throws otherwise.
</p>
<emu-clause id="sec-temporal-totemporaldate" type="abstract operation">
<h1>
ToTemporalDate (
_item_: an ECMAScript language value,
optional _options_: an Object or *undefined*,
): either a normal completion containing a Temporal.PlainDate, or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It returns its argument _item_ if it is already a Temporal.PlainDate instance, converts _item_ to a new Temporal.PlainDate instance if possible, and throws otherwise.</dd>
</dl>
<emu-alg>
1. If _options_ is not present, set _options_ to *undefined*.
1. Assert: Type(_options_) is Object or Undefined.
1. If _options_ is not *undefined*, set _options_ to ? SnapshotOwnProperties(? GetOptionsObject(_options_), *null*).
1. If _options_ is not *undefined*, set _options_ to ? SnapshotOwnProperties(! GetOptionsObject(_options_), *null*).
1. If Type(_item_) is Object, then
1. If _item_ has an [[InitializedTemporalDate]] internal slot, then
1. Return _item_.
Expand Down
19 changes: 12 additions & 7 deletions spec/plaindatetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -983,15 +983,20 @@ <h1>
</emu-alg>
</emu-clause>

<emu-clause id="sec-temporal-totemporaldatetime" aoid="ToTemporalDateTime">
<h1>ToTemporalDateTime ( _item_ [ , _options_ ] )</h1>
<p>
The abstract operation ToTemporalDateTime returns its argument _item_ if it is already a Temporal.PlainDateTime instance, converts _item_ to a new Temporal.PlainDateTime instance if possible, and throws otherwise.
</p>
<emu-clause id="sec-temporal-totemporaldatetime" type="abstract operation">
<h1>
ToTemporalDateTime (
_item_: an ECMAScript language value,
optional _options_: an Object or *undefined*,
): either a normal completion containing a Temporal.PlainDateTime, or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It returns its argument _item_ if it is already a Temporal.PlainDateTime instance, converts _item_ to a new Temporal.PlainDateTime instance if possible, and throws otherwise.</dd>
</dl>
<emu-alg>
1. If _options_ is not present, set _options_ to *undefined*.
1. Assert: Type(_options_) is Object or Undefined.
1. Let _resolvedOptions_ be ? SnapshotOwnProperties(? GetOptionsObject(_options_), *null*).
1. Let _resolvedOptions_ be ? SnapshotOwnProperties(! GetOptionsObject(_options_), *null*).
1. If Type(_item_) is Object, then
1. If _item_ has an [[InitializedTemporalDateTime]] internal slot, then
1. Return _item_.
Expand Down
19 changes: 12 additions & 7 deletions spec/plainmonthday.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,20 @@ <h1>Properties of Temporal.PlainMonthDay Instances</h1>
<emu-clause id="sec-temporal-plainmonthday-abstract-ops">
<h1>Abstract operations</h1>

<emu-clause id="sec-temporal-totemporalmonthday" aoid="ToTemporalMonthDay">
<h1>ToTemporalMonthDay ( _item_ [ , _options_ ] )</h1>
<p>
The abstract operation ToTemporalMonthDay returns its argument _item_ if it is already a Temporal.PlainMonthDay instance, converts _item_ to a new Temporal.PlainMonthDay instance if possible, and throws otherwise.
</p>
<emu-clause id="sec-temporal-totemporalmonthday" type="abstract operation">
<h1>
ToTemporalMonthDay (
_item_: an ECMAScript language value,
optional _options_: an Object or *undefined*,
): either a normal completion containing a Temporal.PlainMonthDay, or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It returns its argument _item_ if it is already a Temporal.PlainMonthDay instance, converts _item_ to a new Temporal.PlainMonthDay instance if possible, and throws otherwise.</dd>
</dl>
<emu-alg>
1. If _options_ is not present, set _options_ to *undefined*.
1. Assert: Type(_options_) is Object or Undefined.
1. If _options_ is not *undefined*, set _options_ to ? SnapshotOwnProperties(? GetOptionsObject(_options_), *null*).
1. If _options_ is not *undefined*, set _options_ to ? SnapshotOwnProperties(! GetOptionsObject(_options_), *null*).
1. Let _referenceISOYear_ be 1972 (the first leap year after the epoch).
1. If Type(_item_) is Object, then
1. If _item_ has an [[InitializedTemporalMonthDay]] internal slot, then
Expand Down
19 changes: 12 additions & 7 deletions spec/plainyearmonth.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,20 @@ <h1>Properties of Temporal.PlainYearMonth Instances</h1>
<emu-clause id="sec-temporal-plainyearmonth-abstract-ops">
<h1>Abstract operations</h1>

<emu-clause id="sec-temporal-totemporalyearmonth" aoid="ToTemporalYearMonth">
<h1>ToTemporalYearMonth ( _item_ [ , _options_ ] )</h1>
<p>
The abstract operation ToTemporalYearMonth returns its argument _item_ if it is already a Temporal.PlainYearMonth instance, converts _item_ to a new Temporal.PlainYearMonth instance if possible, and throws otherwise.
</p>
<emu-clause id="sec-temporal-totemporalyearmonth" type="abstract operation">
<h1>
ToTemporalYearMonth (
_item_: an ECMAScript language value,
optional _options_: an Object or *undefined*,
): either a normal completion containing a Temporal.PlainYearMonth, or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It returns its argument _item_ if it is already a Temporal.PlainYearMonth instance, converts _item_ to a new Temporal.PlainYearMonth instance if possible, and throws otherwise.</dd>
</dl>
<emu-alg>
1. If _options_ is not present, set _options_ to *undefined*.
1. Assert: Type(_options_) is Object or Undefined.
1. If _options_ is not *undefined*, set _options_ to ? SnapshotOwnProperties(? GetOptionsObject(_options_), *null*).
1. If _options_ is not *undefined*, set _options_ to ? SnapshotOwnProperties(! GetOptionsObject(_options_), *null*).
1. If Type(_item_) is Object, then
1. If _item_ has an [[InitializedTemporalYearMonth]] internal slot, then
1. Return _item_.
Expand Down
4 changes: 3 additions & 1 deletion spec/timezone.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,14 @@ <h1>get Temporal.TimeZone.prototype.id</h1>
</emu-clause>

<emu-clause id="sec-temporal.timezone.prototype.equals">
<h1>Temporal.TimeZone.prototype.equals ( _other_ )</h1>
<h1>Temporal.TimeZone.prototype.equals ( _timeZoneLike_ )</h1>
<p>
This method performs the following steps when called:
</p>
<emu-alg>
1. Let _timeZone_ be the *this* value.
1. Perform ? RequireInternalSlot(_timeZone_, [[InitializedTemporalTimeZone]]).
1. Let _other_ be ? ToTemporalTimeZoneSlotValue(_timeZoneLike_).
1. Return ? TimeZoneEquals(_timeZone_, _other_).
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -704,6 +705,7 @@ <h1>
<emu-alg>
1. If _precalculatedOffsetNanoseconds_ is present, let _offsetNanoseconds_ be _precalculatedOffsetNanoseconds_.
1. Else, let _offsetNanoseconds_ be ? GetOffsetNanosecondsFor(_timeZone_, _instant_).
1. Assert: abs(_offsetNanoseconds_) &lt; nsPerDay.
1. Let _result_ be ! GetISOPartsFromEpoch(ℝ(_instant_.[[Nanoseconds]])).
1. Set _result_ to BalanceISODateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]] + _offsetNanoseconds_).
1. Return ? CreateTemporalDateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _calendar_).
Expand Down
11 changes: 5 additions & 6 deletions spec/zoneddatetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ <h1>Temporal.ZonedDateTime.prototype.round ( _roundTo_ )</h1>
1. Let _instant_ be ! CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]).
1. Let _calendar_ be _zonedDateTime_.[[Calendar]].
1. Let _offsetNanoseconds_ be ? GetOffsetNanosecondsFor(_timeZone_, _instant_).
1. Let _temporalDateTime_ be ? GetPlainDateTimeFor(_timeZone_, _instant_, _calendar_, _offsetNanoseconds_).
1. Let _temporalDateTime_ be ! GetPlainDateTimeFor(_timeZone_, _instant_, _calendar_, _offsetNanoseconds_).
1. Let _dtStart_ be ? CreateTemporalDateTime(_temporalDateTime_.[[ISOYear]], _temporalDateTime_.[[ISOMonth]], _temporalDateTime_.[[ISODay]], 0, 0, 0, 0, 0, 0, *"iso8601"*).
1. Let _instantStart_ be ? GetInstantFor(_timeZone_, _dtStart_, *"compatible"*).
1. Let _startNs_ be _instantStart_.[[Nanoseconds]].
Expand Down Expand Up @@ -983,7 +983,7 @@ <h1>Temporal.ZonedDateTime.prototype.getISOFields ( )</h1>
1. Let _instant_ be ! CreateTemporalInstant(_zonedDateTime_.[[Nanoseconds]]).
1. Let _calendar_ be _zonedDateTime_.[[Calendar]].
1. Let _offsetNanoseconds_ be ? GetOffsetNanosecondsFor(_timeZone_, _instant_).
1. Let _dateTime_ be ? GetPlainDateTimeFor(_timeZone_, _instant_, _calendar_, _offsetNanoseconds_).
1. Let _dateTime_ be ! GetPlainDateTimeFor(_timeZone_, _instant_, _calendar_, _offsetNanoseconds_).
1. Let _offset_ be FormatUTCOffsetNanoseconds(_offsetNanoseconds_).
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"calendar"*, _calendar_).
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoDay"*, 𝔽(_dateTime_.[[ISODay]])).
Expand Down Expand Up @@ -1148,7 +1148,7 @@ <h1>
ToTemporalZonedDateTime (
_item_: an ECMAScript language value,
optional _options_: an Object,
): either a normal completion containing a `Temporal.ZonedDateTime` or an abrupt completion
): either a normal completion containing a Temporal.ZonedDateTime, or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
Expand All @@ -1158,8 +1158,7 @@ <h1>
</dl>
<emu-alg>
1. If _options_ is not present, set _options_ to *undefined*.
1. Assert: Type(_options_) is Object or Undefined.
1. Let _resolvedOptions_ be ? SnapshotOwnProperties(? GetOptionsObject(_options_), *null*).
1. Let _resolvedOptions_ be ? SnapshotOwnProperties(! GetOptionsObject(_options_), *null*).
1. Let _offsetBehaviour_ be ~option~.
1. Let _matchBehaviour_ be ~match exactly~.
1. If Type(_item_) is Object, then
Expand Down Expand Up @@ -1257,7 +1256,7 @@ <h1>
1. Let _timeZone_ be _zonedDateTime_.[[TimeZone]].
1. Let _instant_ be ! CreateTemporalInstant(_ns_).
1. Let _offsetNanoseconds_ be ? GetOffsetNanosecondsFor(_timeZone_, _instant_).
1. Let _temporalDateTime_ be ? GetPlainDateTimeFor(_timeZone_, _instant_, *"iso8601"*, _offsetNanoseconds_).
1. Let _temporalDateTime_ be ! GetPlainDateTimeFor(_timeZone_, _instant_, *"iso8601"*, _offsetNanoseconds_).
1. Let _dateTimeString_ be ! TemporalDateTimeToString(_temporalDateTime_.[[ISOYear]], _temporalDateTime_.[[ISOMonth]], _temporalDateTime_.[[ISODay]], _temporalDateTime_.[[ISOHour]], _temporalDateTime_.[[ISOMinute]], _temporalDateTime_.[[ISOSecond]], _temporalDateTime_.[[ISOMillisecond]], _temporalDateTime_.[[ISOMicrosecond]], _temporalDateTime_.[[ISONanosecond]], *"iso8601"*, _precision_, *"never"*).
1. If _showOffset_ is *"never"*, then
1. Let _offsetString_ be the empty String.
Expand Down