diff --git a/polyfill/lib/ecmascript.mjs b/polyfill/lib/ecmascript.mjs index 6292f2118b..2b39b549df 100644 --- a/polyfill/lib/ecmascript.mjs +++ b/polyfill/lib/ecmascript.mjs @@ -1844,11 +1844,13 @@ export const ES = ObjectAssign({}, ES2020, { return cal1 < cal2 ? -1 : cal1 > cal2 ? 1 : 0; }, CalendarEquals: (one, two) => { + if (one === two) return true; const cal1 = ES.ToString(one); const cal2 = ES.ToString(two); return cal1 === cal2; }, ConsolidateCalendars: (one, two) => { + if (one === two) return two; const sOne = ES.ToString(one); const sTwo = ES.ToString(two); if (sOne === sTwo || sOne === 'iso8601') { @@ -1893,6 +1895,7 @@ export const ES = ObjectAssign({}, ES2020, { return new TemporalTimeZone(timeZone); }, TimeZoneEquals: (one, two) => { + if (one === two) return true; const tz1 = ES.ToString(one); const tz2 = ES.ToString(two); return tz1 === tz2; diff --git a/spec/calendar.html b/spec/calendar.html index dbf2fbb19b..bc23629de4 100644 --- a/spec/calendar.html +++ b/spec/calendar.html @@ -329,6 +329,7 @@

FormatCalendarAnnotation ( _id_, _showCalendar_ )

CalendarEquals ( _one_, _two_ )

+ 1. If _one_ and _two_ are the same Object value, return *true*. 1. Let _calendarOne_ be ? ToString(_one_). 1. Let _calendarTwo_ be ? ToString(_two_). 1. If _calendarOne_ is _calendarTwo_, return *true*. @@ -339,6 +340,7 @@

CalendarEquals ( _one_, _two_ )

ConsolidateCalendars ( _one_, _two_ )

+ 1. If _one_ and _two_ are the same Object value, return _two_. 1. Let _calendarOne_ be ? ToString(_one_). 1. Let _calendarTwo_ be ? ToString(_two_). 1. If _calendarOne_ is _calendarTwo_, return _two_. diff --git a/spec/timezone.html b/spec/timezone.html index 33da16b8fe..fa73308591 100644 --- a/spec/timezone.html +++ b/spec/timezone.html @@ -640,6 +640,7 @@

TimeZoneEquals ( _one_, _two_ )

calling `toString()` on its arguments are equal.

+ 1. If _one_ and _two_ are the same Object value, return *true*. 1. Let _timeZoneOne_ be ? ToString(_one_). 1. Let _timeZoneTwo_ be ? ToString(_two_). 1. If _timeZoneOne_ is _timeZoneTwo_, return *true*.