Skip to content

Commit

Permalink
Editorial: Conform with ECMA-262 conventions for inequality
Browse files Browse the repository at this point in the history
`≠` should be encoded as `≠`
  • Loading branch information
gibson042 committed Apr 28, 2022
1 parent 30697ad commit a5ee1cd
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions spec/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ <h1>ConsolidateCalendars ( _one_, _two_ )</h1>
<h1>IsISOLeapYear ( _year_ )</h1>
<emu-alg>
1. Assert: _year_ is an integer.
1. If _year_ modulo 4 0, return *false*.
1. If _year_ modulo 4 &ne; 0, return *false*.
1. If _year_ modulo 400 = 0, return *true*.
1. If _year_ modulo 100 = 0, return *false*.
1. Return *true*.
Expand Down Expand Up @@ -539,7 +539,7 @@ <h1>ResolveISOMonth ( _fields_ )</h1>
1. Let _numberPart_ be the substring of _monthCode_ from 1.
1. Set _numberPart_ to ! ToIntegerOrInfinity(_numberPart_).
1. If _numberPart_ &lt; 1 or _numberPart_ &gt; 12, throw a *RangeError* exception.
1. If _month_ is not *undefined*, and _month_ _numberPart_, then
1. If _month_ is not *undefined*, and _month_ &ne; _numberPart_, then
1. Throw a *RangeError* exception.
1. If SameValueNonNumeric(_monthCode_, ! BuildISOMonthCode(_numberPart_)) is *false*, then
1. Throw a *RangeError* exception.
Expand Down
18 changes: 9 additions & 9 deletions spec/duration.html
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ <h1>
<dd>It computes an integer number of nanoseconds from the given units, applying a given time zone offset shift in nanoseconds when converting from days to hours.</dd>
</dl>
<emu-alg>
1. If _days_ 0, then
1. If _days_ &ne; 0, then
1. Set _nanoseconds_ to _nanoseconds_ - _offsetShift_.
1. Set _hours_ to _hours_ + _days_ &times; 24.
1. Set _minutes_ to _minutes_ + _hours_ &times; 60.
Expand Down Expand Up @@ -1285,7 +1285,7 @@ <h1>
1. If _largestUnit_ is *"year"*, or _years_, _months_, _weeks_, and _days_ are all 0, then
1. Return ! CreateDateDurationRecord(_years_, _months_, _weeks_, _days_).
1. Let _sign_ be ! DurationSign(_years_, _months_, _weeks_, _days_, 0, 0, 0, 0, 0, 0).
1. Assert: _sign_ 0.
1. Assert: _sign_ &ne; 0.
1. Let _oneYear_ be ! CreateTemporalDuration(_sign_, 0, 0, 0, 0, 0, 0, 0, 0, 0).
1. Let _oneMonth_ be ! CreateTemporalDuration(0, _sign_, 0, 0, 0, 0, 0, 0, 0, 0).
1. Let _oneWeek_ be ! CreateTemporalDuration(0, 0, _sign_, 0, 0, 0, 0, 0, 0, 0).
Expand All @@ -1299,7 +1299,7 @@ <h1>
1. Throw a *RangeError* exception.
1. Let _dateAdd_ be ? GetMethod(_calendar_, *"dateAdd"*).
1. Let _dateUntil_ be ? GetMethod(_calendar_, *"dateUntil"*).
1. Repeat, while _years_ 0,
1. Repeat, while _years_ &ne; 0,
1. Let _newRelativeTo_ be ? CalendarDateAdd(_calendar_, _relativeTo_, _oneYear_, *undefined*, _dateAdd_).
1. Let _untilOptions_ be OrdinaryObjectCreate(*null*).
1. Perform ! CreateDataPropertyOrThrow(_untilOptions_, *"largestUnit"*, *"month"*).
Expand All @@ -1311,12 +1311,12 @@ <h1>
1. Else if _largestUnit_ is *"week"*, then
1. If _calendar_ is *undefined*, then
1. Throw a *RangeError* exception.
1. Repeat, while _years_ 0,
1. Repeat, while _years_ &ne; 0,
1. Let _moveResult_ be ? MoveRelativeDate(_calendar_, _relativeTo_, _oneYear_).
1. Set _relativeTo_ to _moveResult_.[[RelativeTo]].
1. Set _days_ to _days_ + _moveResult_.[[Days]].
1. Set _years_ to _years_ - _sign_.
1. Repeat, while _months_ 0,
1. Repeat, while _months_ &ne; 0,
1. Let _moveResult_ be ? MoveRelativeDate(_calendar_, _relativeTo_, _oneMonth_).
1. Set _relativeTo_ to _moveResult_.[[RelativeTo]].
1. Set _days_ to _days_ + _moveResult_.[[Days]].
Expand All @@ -1325,17 +1325,17 @@ <h1>
1. If any of _years_, _months_, and _weeks_ are not zero, then
1. If _calendar_ is *undefined*, then
1. Throw a *RangeError* exception.
1. Repeat, while _years_ 0,
1. Repeat, while _years_ &ne; 0,
1. Let _moveResult_ be ? MoveRelativeDate(_calendar_, _relativeTo_, _oneYear_).
1. Set _relativeTo_ to _moveResult_.[[RelativeTo]].
1. Set _days_ to _days_ + _moveResult_.[[Days]].
1. Set _years_ to _years_ - _sign_.
1. Repeat, while _months_ 0,
1. Repeat, while _months_ &ne; 0,
1. Let _moveResult_ be ? MoveRelativeDate(_calendar_, _relativeTo_, _oneMonth_).
1. Set _relativeTo_ to _moveResult_.[[RelativeTo]].
1. Set _days_ to _days_ +_moveResult_.[[Days]].
1. Set _months_ to _months_ - _sign_.
1. Repeat, while _weeks_ 0,
1. Repeat, while _weeks_ &ne; 0,
1. Let _moveResult_ be ? MoveRelativeDate(_calendar_, _relativeTo_, _oneWeek_).
1. Set _relativeTo_ to _moveResult_.[[RelativeTo]].
1. Set _days_ to _days_ + _moveResult_.[[Days]].
Expand Down Expand Up @@ -1364,7 +1364,7 @@ <h1>
1. [id="step-balance-duration-relative-early-return"] Return ! CreateDateDurationRecord(_years_, _months_, _weeks_, _days_).
1. Assert: _relativeTo_ is not *undefined*, because callers of this operation ensure _relativeTo_ is required in conditions where this algorithm does not return in step <emu-xref href="#step-balance-duration-relative-early-return"></emu-xref>.
1. Let _sign_ be ! DurationSign(_years_, _months_, _weeks_, _days_, 0, 0, 0, 0, 0, 0).
1. Assert: _sign_ 0.
1. Assert: _sign_ &ne; 0.
1. Let _oneYear_ be ! CreateTemporalDuration(_sign_, 0, 0, 0, 0, 0, 0, 0, 0, 0).
1. Let _oneMonth_ be ! CreateTemporalDuration(0, _sign_, 0, 0, 0, 0, 0, 0, 0, 0).
1. Let _oneWeek_ be ! CreateTemporalDuration(0, 0, _sign_, 0, 0, 0, 0, 0, 0, 0).
Expand Down
2 changes: 1 addition & 1 deletion spec/instant.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ <h1>Temporal.Instant.prototype.equals ( _other_ )</h1>
1. Let _instant_ be the *this* value.
1. Perform ? RequireInternalSlot(_instant_, [[InitializedTemporalInstant]]).
1. Set _other_ to ? ToTemporalInstant(_other_).
1. If _instant_.[[Nanoseconds]] _other_.[[Nanoseconds]], return *false*.
1. If _instant_.[[Nanoseconds]] &ne; _other_.[[Nanoseconds]], return *false*.
1. Return *true*.
</emu-alg>
</emu-clause>
Expand Down
10 changes: 5 additions & 5 deletions spec/plaindate.html
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ <h1>Temporal.PlainDate.prototype.until ( _other_ [ , _options_ ] )</h1>
1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, *undefined*, *false*).
1. Let _untilOptions_ be ? MergeLargestUnitOption(_options_, _largestUnit_).
1. Let _result_ be ? CalendarDateUntil(_temporalDate_.[[Calendar]], _temporalDate_, _other_, _untilOptions_).
1. If _smallestUnit_ is not *"day"* or _roundingIncrement_ 1, then
1. If _smallestUnit_ is not *"day"* or _roundingIncrement_ &ne; 1, then
1. Set _result_ to (? RoundDuration(_result_.[[Years]], _result_.[[Months]], _result_.[[Weeks]], _result_.[[Days]], 0, 0, 0, 0, 0, 0, _roundingIncrement_, _smallestUnit_, _roundingMode_, _temporalDate_)).[[DurationRecord]].
1. Return ! CreateTemporalDuration(_result_.[[Years]], _result_.[[Months]], _result_.[[Weeks]], _result_.[[Days]], 0, 0, 0, 0, 0, 0).
</emu-alg>
Expand Down Expand Up @@ -455,7 +455,7 @@ <h1>Temporal.PlainDate.prototype.since ( _other_ [ , _options_ ] )</h1>
1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, *undefined*, *false*).
1. Let _untilOptions_ be ? MergeLargestUnitOption(_options_, _largestUnit_).
1. Let _result_ be ? CalendarDateUntil(_temporalDate_.[[Calendar]], _temporalDate_, _other_, _untilOptions_).
1. If _smallestUnit_ is not *"day"* or _roundingIncrement_ 1, then
1. If _smallestUnit_ is not *"day"* or _roundingIncrement_ &ne; 1, then
1. Set _result_ to (? RoundDuration(_result_.[[Years]], _result_.[[Months]], _result_.[[Weeks]], _result_.[[Days]], 0, 0, 0, 0, 0, 0, _roundingIncrement_, _smallestUnit_, _roundingMode_, _temporalDate_)).[[DurationRecord]].
1. Return ! CreateTemporalDuration(-_result_.[[Years]], -_result_.[[Months]], -_result_.[[Weeks]], -_result_.[[Days]], 0, 0, 0, 0, 0, 0).
</emu-alg>
Expand All @@ -471,9 +471,9 @@ <h1>Temporal.PlainDate.prototype.equals ( _other_ )</h1>
1. Let _temporalDate_ be the *this* value.
1. Perform ? RequireInternalSlot(_temporalDate_, [[InitializedTemporalDate]]).
1. Set _other_ to ? ToTemporalDate(_other_).
1. If _temporalDate_.[[ISOYear]] _other_.[[ISOYear]], return *false*.
1. If _temporalDate_.[[ISOMonth]] _other_.[[ISOMonth]], return *false*.
1. If _temporalDate_.[[ISODay]] _other_.[[ISODay]], return *false*.
1. If _temporalDate_.[[ISOYear]] &ne; _other_.[[ISOYear]], return *false*.
1. If _temporalDate_.[[ISOMonth]] &ne; _other_.[[ISOMonth]], return *false*.
1. If _temporalDate_.[[ISODay]] &ne; _other_.[[ISODay]], return *false*.
1. Return ? CalendarEquals(_temporalDate_.[[Calendar]], _other_.[[Calendar]]).
</emu-alg>
</emu-clause>
Expand Down
6 changes: 3 additions & 3 deletions spec/plainmonthday.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ <h1>Temporal.PlainMonthDay.prototype.equals ( _other_ )</h1>
1. Let _monthDay_ be the *this* value.
1. Perform ? RequireInternalSlot(_monthDay_, [[InitializedTemporalMonthDay]]).
1. Set _other_ to ? ToTemporalMonthDay(_other_).
1. If _monthDay_.[[ISOMonth]] _other_.[[ISOMonth]], return *false*.
1. If _monthDay_.[[ISODay]] _other_.[[ISODay]], return *false*.
1. If _monthDay_.[[ISOYear]] _other_.[[ISOYear]], return *false*.
1. If _monthDay_.[[ISOMonth]] &ne; _other_.[[ISOMonth]], return *false*.
1. If _monthDay_.[[ISODay]] &ne; _other_.[[ISODay]], return *false*.
1. If _monthDay_.[[ISOYear]] &ne; _other_.[[ISOYear]], return *false*.
1. Return ? CalendarEquals(_monthDay_.[[Calendar]], _other_.[[Calendar]]).
</emu-alg>
</emu-clause>
Expand Down
12 changes: 6 additions & 6 deletions spec/plaintime.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,12 @@ <h1>Temporal.PlainTime.prototype.equals ( _other_ )</h1>
1. Let _temporalTime_ be the *this* value.
1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]).
1. Set _other_ to ? ToTemporalTime(_other_).
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. If _temporalTime_.[[ISOHour]] &ne; _other_.[[ISOHour]], return *false*.
1. If _temporalTime_.[[ISOMinute]] &ne; _other_.[[ISOMinute]], return *false*.
1. If _temporalTime_.[[ISOSecond]] &ne; _other_.[[ISOSecond]], return *false*.
1. If _temporalTime_.[[ISOMillisecond]] &ne; _other_.[[ISOMillisecond]], return *false*.
1. If _temporalTime_.[[ISOMicrosecond]] &ne; _other_.[[ISOMicrosecond]], return *false*.
1. If _temporalTime_.[[ISONanosecond]] &ne; _other_.[[ISONanosecond]], return *false*.
1. Return *true*.
</emu-alg>
</emu-clause>
Expand Down
6 changes: 3 additions & 3 deletions spec/plainyearmonth.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ <h1>Temporal.PlainYearMonth.prototype.equals ( _other_ )</h1>
1. Let _yearMonth_ be the *this* value.
1. Perform ? RequireInternalSlot(_yearMonth_, [[InitializedTemporalYearMonth]]).
1. Set _other_ to ? ToTemporalYearMonth(_other_).
1. If _yearMonth_.[[ISOYear]] _other_.[[ISOYear]], return *false*.
1. If _yearMonth_.[[ISOMonth]] _other_.[[ISOMonth]], return *false*.
1. If _yearMonth_.[[ISODay]] _other_.[[ISODay]], return *false*.
1. If _yearMonth_.[[ISOYear]] &ne; _other_.[[ISOYear]], return *false*.
1. If _yearMonth_.[[ISOMonth]] &ne; _other_.[[ISOMonth]], return *false*.
1. If _yearMonth_.[[ISODay]] &ne; _other_.[[ISODay]], return *false*.
1. Return ? CalendarEquals(_yearMonth_.[[Calendar]], _other_.[[Calendar]]).
</emu-alg>
</emu-clause>
Expand Down
8 changes: 4 additions & 4 deletions spec/timezone.html
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ <h1>FormatTimeZoneOffsetString ( _offsetNanoseconds_ )</h1>
1. Let _h_ be ToZeroPaddedDecimalString(_hours_, 2).
1. Let _m_ be ToZeroPaddedDecimalString(_minutes_, 2).
1. Let _s_ be ToZeroPaddedDecimalString(_seconds_, 2).
1. If _nanoseconds_ 0, then
1. If _nanoseconds_ &ne; 0, then
1. Let _fraction_ be ToZeroPaddedDecimalString(_nanoseconds_, 9).
1. Set _fraction_ to the longest possible substring of _fraction_ starting at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO).
1. Let _post_ be the string-concatenation of the code unit 0x003A (COLON), _s_, the code unit 0x002E (FULL STOP), and _fraction_.
1. Else if seconds 0, then
1. Else if seconds &ne; 0, then
1. Let _post_ be the string-concatenation of the code unit 0x003A (COLON) and _s_.
1. Else,
1. Let _post_ be the empty String.
Expand Down Expand Up @@ -621,7 +621,7 @@ <h1>ToTemporalTimeZone ( _temporalTimeZoneLike_ )</h1>
1. Let _parseResult_ be ? ParseTemporalTimeZoneString(_identifier_).
1. If _parseResult_.[[Name]] is not *undefined*, then
1. If ParseText(StringToCodePoints(_parseResult_.[[Name]], |TimeZoneNumericUTCOffset|)) is not a List of errors, then
1. If _parseResult_.[[OffsetString]] is not *undefined*, and ! ParseTimeZoneOffsetString(_parseResult_.[[OffsetString]]) ! ParseTimeZoneOffsetString(_parseResult_.[[Name]]), throw a *RangeError* exception.
1. If _parseResult_.[[OffsetString]] is not *undefined*, and ! ParseTimeZoneOffsetString(_parseResult_.[[OffsetString]]) &ne; ! ParseTimeZoneOffsetString(_parseResult_.[[Name]]), throw a *RangeError* exception.
1. Else,
1. If ! IsValidTimeZoneName(_parseResult_.[[Name]]) is *false*, throw a *RangeError* exception.
1. Return ! CreateTemporalTimeZone(! CanonicalizeTimeZoneName(_parseResult_.[[Name]])).
Expand Down Expand Up @@ -693,7 +693,7 @@ <h1>DisambiguatePossibleInstants ( _possibleInstants_, _timeZone_, _dateTime_, _
1. Let _n_ be _possibleInstants_'s length.
1. If _n_ = 1, then
1. Return _possibleInstants_[0].
1. If _n_ 0, then
1. If _n_ &ne; 0, then
1. If _disambiguation_ is *"earlier"* or *"compatible"*, then
1. Return _possibleInstants_[0].
1. If _disambiguation_ is *"later"*, then
Expand Down
2 changes: 1 addition & 1 deletion spec/zoneddatetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ <h1>Temporal.ZonedDateTime.prototype.equals ( _other_ )</h1>
1. Let _zonedDateTime_ be the *this* value.
1. Perform ? RequireInternalSlot(_zonedDateTime_, [[InitializedTemporalZonedDateTime]]).
1. Set _other_ to ? ToTemporalZonedDateTime(_other_).
1. If _zonedDateTime_.[[Nanoseconds]] _other_.[[Nanoseconds]], return *false*.
1. If _zonedDateTime_.[[Nanoseconds]] &ne; _other_.[[Nanoseconds]], return *false*.
1. If ? TimeZoneEquals(_zonedDateTime_.[[TimeZone]], _other_.[[TimeZone]]) is *false*, return *false*.
1. Return ? CalendarEquals(_zonedDateTime_.[[Calendar]], _other_.[[Calendar]]).
</emu-alg>
Expand Down

0 comments on commit a5ee1cd

Please sign in to comment.