Skip to content

Commit

Permalink
Add ToTemporalTimeZoneSlotValue in TimeZone.p.equals
Browse files Browse the repository at this point in the history
Without this, we will fail some assertions in the case of a non-string
argument, or a string argument that's not a valid time zone identifier.
In the plain object case, we'll also miss some Has calls in
ObjectImplementsTemporalTimeZoneProtocol.

Closes: #41
  • Loading branch information
ptomato authored and justingrant committed Sep 25, 2023
1 parent ca4a5ce commit 596b62f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/timezone.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ <h1>Temporal.TimeZone ( _identifier_ )</h1>

<ins class="block">
<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

0 comments on commit 596b62f

Please sign in to comment.