From ce4de0594c6e55ccb270f15ad353d5837cdc0083 Mon Sep 17 00:00:00 2001
From: Philip Chimento
Date: Fri, 25 Nov 2022 09:57:40 -0800
Subject: [PATCH] Normative: Remove calendar property from PlainTime
PlainTime now has no calendar. Removes the getter and the internal slot.
Calendar annotations are now ignored in ParseTemporalTimeString.
RejectObjectWithCalendarOrTimeZone still rejects PlainTime, so it is
renamed to RejectTemporalObject.
ToTemporalCalendar rejects PlainTime explicitly instead of looking for its
`calendar` property or treating it as a plain object calendar.
See: #1808
Closes: #1588
---
polyfill/lib/ecmascript.mjs | 37 +++++++++++++++------------------
polyfill/lib/plaindate.mjs | 2 +-
polyfill/lib/plaindatetime.mjs | 2 +-
polyfill/lib/plainmonthday.mjs | 2 +-
polyfill/lib/plaintime.mjs | 8 +------
polyfill/lib/plainyearmonth.mjs | 2 +-
polyfill/lib/zoneddatetime.mjs | 2 +-
polyfill/test/validStrings.mjs | 2 +-
polyfill/test262 | 2 +-
spec/abstractops.html | 18 +++++++++-------
spec/calendar.html | 8 +++----
spec/plaindate.html | 2 +-
spec/plaindatetime.html | 2 +-
spec/plainmonthday.html | 2 +-
spec/plaintime.html | 32 ++--------------------------
spec/plainyearmonth.html | 2 +-
spec/zoneddatetime.html | 2 +-
17 files changed, 47 insertions(+), 80 deletions(-)
diff --git a/polyfill/lib/ecmascript.mjs b/polyfill/lib/ecmascript.mjs
index a37d3919cb..52facd0ef3 100644
--- a/polyfill/lib/ecmascript.mjs
+++ b/polyfill/lib/ecmascript.mjs
@@ -317,10 +317,13 @@ export const ES = ObjectAssign({}, ES2022, {
IsTemporalYearMonth: (item) => HasSlot(item, YEAR_MONTH_BRAND),
IsTemporalMonthDay: (item) => HasSlot(item, MONTH_DAY_BRAND),
IsTemporalZonedDateTime: (item) => HasSlot(item, EPOCHNANOSECONDS, TIME_ZONE, CALENDAR),
- RejectObjectWithCalendarOrTimeZone: (item) => {
+ RejectTemporalObject: (item) => {
if (HasSlot(item, CALENDAR) || HasSlot(item, TIME_ZONE)) {
throw new TypeError('with() does not support a calendar or timeZone property');
}
+ if (ES.IsTemporalTime(item)) {
+ throw new TypeError('with() does not accept Temporal.PlainTime, use withPlainTime() instead');
+ }
if (item.calendar !== undefined) {
throw new TypeError('with() does not support a calendar property');
}
@@ -430,7 +433,7 @@ export const ES = ObjectAssign({}, ES2022, {
},
ParseTemporalTimeString: (isoString) => {
const match = PARSE.time.exec(isoString);
- let hour, minute, second, millisecond, microsecond, nanosecond, annotations, calendar;
+ let hour, minute, second, millisecond, microsecond, nanosecond, annotations;
if (match) {
hour = ES.ToIntegerOrInfinity(match[1]);
minute = ES.ToIntegerOrInfinity(match[2] || match[5]);
@@ -442,23 +445,20 @@ export const ES = ObjectAssign({}, ES2022, {
nanosecond = ES.ToIntegerOrInfinity(fraction.slice(6, 9));
annotations = match[14];
for (const [, critical, key, value] of annotations.matchAll(PARSE.annotation)) {
- if (key === 'u-ca') {
- if (calendar === undefined) calendar = value;
- } else if (critical === '!') {
+ if (key !== 'u-ca' && critical === '!') {
throw new RangeError(`Unrecognized annotation: !${key}=${value}`);
}
}
if (match[8]) throw new RangeError('Z designator not supported for PlainTime');
} else {
let z, hasTime;
- ({ hasTime, hour, minute, second, millisecond, microsecond, nanosecond, calendar, z } =
- ES.ParseISODateTime(isoString));
+ ({ hasTime, hour, minute, second, millisecond, microsecond, nanosecond, z } = ES.ParseISODateTime(isoString));
if (!hasTime) throw new RangeError(`time is missing in string: ${isoString}`);
if (z) throw new RangeError('Z designator not supported for PlainTime');
}
// if it's a date-time string, OK
if (/[tT ][0-9][0-9]/.test(isoString)) {
- return { hour, minute, second, millisecond, microsecond, nanosecond, calendar };
+ return { hour, minute, second, millisecond, microsecond, nanosecond };
}
// Reject strings that are ambiguous with PlainMonthDay or PlainYearMonth.
try {
@@ -469,7 +469,7 @@ export const ES = ObjectAssign({}, ES2022, {
const { year, month } = ES.ParseTemporalYearMonthString(isoString);
ES.RejectISODate(year, month, 1);
} catch {
- return { hour, minute, second, millisecond, microsecond, nanosecond, calendar };
+ return { hour, minute, second, millisecond, microsecond, nanosecond };
}
}
throw new RangeError(`invalid ISO 8601 time-only string ${isoString}; may need a T prefix`);
@@ -1222,7 +1222,7 @@ export const ES = ObjectAssign({}, ES2022, {
return ES.CalendarMonthDayFromFields(calendar, result);
},
ToTemporalTime: (item, overflow = 'constrain') => {
- let hour, minute, second, millisecond, microsecond, nanosecond, calendar;
+ let hour, minute, second, millisecond, microsecond, nanosecond;
if (ES.Type(item) === 'Object') {
if (ES.IsTemporalTime(item)) return item;
if (ES.IsTemporalZonedDateTime(item)) {
@@ -1239,10 +1239,6 @@ export const ES = ObjectAssign({}, ES2022, {
GetSlot(item, ISO_NANOSECOND)
);
}
- calendar = ES.GetTemporalCalendarWithISODefault(item);
- if (ES.ToString(calendar) !== 'iso8601') {
- throw new RangeError('PlainTime can only have iso8601 calendar');
- }
({ hour, minute, second, millisecond, microsecond, nanosecond } = ES.ToTemporalTimeRecord(item));
({ hour, minute, second, millisecond, microsecond, nanosecond } = ES.RegulateTime(
hour,
@@ -1254,13 +1250,8 @@ export const ES = ObjectAssign({}, ES2022, {
overflow
));
} else {
- ({ hour, minute, second, millisecond, microsecond, nanosecond, calendar } = ES.ParseTemporalTimeString(
- ES.ToString(item)
- ));
+ ({ hour, minute, second, millisecond, microsecond, nanosecond } = ES.ParseTemporalTimeString(ES.ToString(item)));
ES.RejectTime(hour, minute, second, millisecond, microsecond, nanosecond);
- if (calendar !== undefined && calendar !== 'iso8601') {
- throw new RangeError('PlainTime can only have iso8601 calendar');
- }
}
const TemporalPlainTime = GetIntrinsic('%Temporal.PlainTime%');
return new TemporalPlainTime(hour, minute, second, millisecond, microsecond, nanosecond);
@@ -1771,12 +1762,18 @@ export const ES = ObjectAssign({}, ES2022, {
if (ES.Type(calendarLike) === 'Object') {
if (ES.IsTemporalCalendar(calendarLike)) return calendarLike;
if (HasSlot(calendarLike, CALENDAR)) return GetSlot(calendarLike, CALENDAR);
+ if (ES.IsTemporalTime(calendarLike)) {
+ throw new RangeError('Expected a calendar object but received a Temporal.PlainTime');
+ }
if (ES.IsTemporalTimeZone(calendarLike)) {
throw new RangeError('Expected a calendar object but received a Temporal.TimeZone');
}
if (!('calendar' in calendarLike)) return calendarLike;
calendarLike = calendarLike.calendar;
if (ES.Type(calendarLike) === 'Object') {
+ if (ES.IsTemporalTime(calendarLike)) {
+ throw new RangeError('Expected a calendar object as the calendar property but received a Temporal.PlainTime');
+ }
if (ES.IsTemporalTimeZone(calendarLike)) {
throw new RangeError('Expected a calendar object as the calendar property but received a Temporal.TimeZone');
}
diff --git a/polyfill/lib/plaindate.mjs b/polyfill/lib/plaindate.mjs
index 875a559600..37fa64ab2f 100644
--- a/polyfill/lib/plaindate.mjs
+++ b/polyfill/lib/plaindate.mjs
@@ -94,7 +94,7 @@ export class PlainDate {
if (ES.Type(temporalDateLike) !== 'Object') {
throw new TypeError('invalid argument');
}
- ES.RejectObjectWithCalendarOrTimeZone(temporalDateLike);
+ ES.RejectTemporalObject(temporalDateLike);
options = ES.GetOptionsObject(options);
const calendar = GetSlot(this, CALENDAR);
diff --git a/polyfill/lib/plaindatetime.mjs b/polyfill/lib/plaindatetime.mjs
index 25f146906e..6ce9260aa0 100644
--- a/polyfill/lib/plaindatetime.mjs
+++ b/polyfill/lib/plaindatetime.mjs
@@ -150,7 +150,7 @@ export class PlainDateTime {
if (ES.Type(temporalDateTimeLike) !== 'Object') {
throw new TypeError('invalid argument');
}
- ES.RejectObjectWithCalendarOrTimeZone(temporalDateTimeLike);
+ ES.RejectTemporalObject(temporalDateTimeLike);
options = ES.GetOptionsObject(options);
const calendar = GetSlot(this, CALENDAR);
diff --git a/polyfill/lib/plainmonthday.mjs b/polyfill/lib/plainmonthday.mjs
index 045063c48c..443024001d 100644
--- a/polyfill/lib/plainmonthday.mjs
+++ b/polyfill/lib/plainmonthday.mjs
@@ -36,7 +36,7 @@ export class PlainMonthDay {
if (ES.Type(temporalMonthDayLike) !== 'Object') {
throw new TypeError('invalid argument');
}
- ES.RejectObjectWithCalendarOrTimeZone(temporalMonthDayLike);
+ ES.RejectTemporalObject(temporalMonthDayLike);
options = ES.GetOptionsObject(options);
const calendar = GetSlot(this, CALENDAR);
diff --git a/polyfill/lib/plaintime.mjs b/polyfill/lib/plaintime.mjs
index 23b547a014..222706f750 100644
--- a/polyfill/lib/plaintime.mjs
+++ b/polyfill/lib/plaintime.mjs
@@ -70,7 +70,6 @@ export class PlainTime {
SetSlot(this, ISO_MILLISECOND, isoMillisecond);
SetSlot(this, ISO_MICROSECOND, isoMicrosecond);
SetSlot(this, ISO_NANOSECOND, isoNanosecond);
- SetSlot(this, CALENDAR, ES.GetISO8601Calendar());
if (typeof __debug__ !== 'undefined' && __debug__) {
Object.defineProperty(this, '_repr_', {
@@ -82,10 +81,6 @@ export class PlainTime {
}
}
- get calendar() {
- if (!ES.IsTemporalTime(this)) throw new TypeError('invalid receiver');
- return GetSlot(this, CALENDAR);
- }
get hour() {
if (!ES.IsTemporalTime(this)) throw new TypeError('invalid receiver');
return GetSlot(this, ISO_HOUR);
@@ -116,7 +111,7 @@ export class PlainTime {
if (ES.Type(temporalTimeLike) !== 'Object') {
throw new TypeError('invalid argument');
}
- ES.RejectObjectWithCalendarOrTimeZone(temporalTimeLike);
+ ES.RejectTemporalObject(temporalTimeLike);
options = ES.GetOptionsObject(options);
const overflow = ES.ToTemporalOverflow(options);
@@ -305,7 +300,6 @@ export class PlainTime {
getISOFields() {
if (!ES.IsTemporalTime(this)) throw new TypeError('invalid receiver');
return {
- calendar: GetSlot(this, CALENDAR),
isoHour: GetSlot(this, ISO_HOUR),
isoMicrosecond: GetSlot(this, ISO_MICROSECOND),
isoMillisecond: GetSlot(this, ISO_MILLISECOND),
diff --git a/polyfill/lib/plainyearmonth.mjs b/polyfill/lib/plainyearmonth.mjs
index 61481bc9e4..7b003fb374 100644
--- a/polyfill/lib/plainyearmonth.mjs
+++ b/polyfill/lib/plainyearmonth.mjs
@@ -62,7 +62,7 @@ export class PlainYearMonth {
if (ES.Type(temporalYearMonthLike) !== 'Object') {
throw new TypeError('invalid argument');
}
- ES.RejectObjectWithCalendarOrTimeZone(temporalYearMonthLike);
+ ES.RejectTemporalObject(temporalYearMonthLike);
options = ES.GetOptionsObject(options);
const calendar = GetSlot(this, CALENDAR);
diff --git a/polyfill/lib/zoneddatetime.mjs b/polyfill/lib/zoneddatetime.mjs
index 92170c6f35..6a1b2866e5 100644
--- a/polyfill/lib/zoneddatetime.mjs
+++ b/polyfill/lib/zoneddatetime.mjs
@@ -179,7 +179,7 @@ export class ZonedDateTime {
if (ES.Type(temporalZonedDateTimeLike) !== 'Object') {
throw new TypeError('invalid zoned-date-time-like');
}
- ES.RejectObjectWithCalendarOrTimeZone(temporalZonedDateTimeLike);
+ ES.RejectTemporalObject(temporalZonedDateTimeLike);
options = ES.GetOptionsObject(options);
const calendar = GetSlot(this, CALENDAR);
diff --git a/polyfill/test/validStrings.mjs b/polyfill/test/validStrings.mjs
index 148c0dfe02..8179ae5c10 100644
--- a/polyfill/test/validStrings.mjs
+++ b/polyfill/test/validStrings.mjs
@@ -426,7 +426,7 @@ const comparisonItems = {
'nanoseconds'
],
MonthDay: ['month', 'day', 'calendar'],
- Time: [...timeItems, 'calendar'],
+ Time: [...timeItems],
TimeZone: ['offset', 'ianaName'],
YearMonth: ['year', 'month', 'calendar'],
ZonedDateTime: [...dateItems, ...timeItems, 'offset', 'ianaName', 'calendar']
diff --git a/polyfill/test262 b/polyfill/test262
index 8ad7d04afa..a29788dd5d 160000
--- a/polyfill/test262
+++ b/polyfill/test262
@@ -1 +1 @@
-Subproject commit 8ad7d04afad209a94771190e9b347eefa1c5cf03
+Subproject commit a29788dd5d4d7664478985928e82f2a1cd7fb37d
diff --git a/spec/abstractops.html b/spec/abstractops.html
index 78d5346ba1..1675319b82 100644
--- a/spec/abstractops.html
+++ b/spec/abstractops.html
@@ -554,13 +554,17 @@ MaximumTemporalDurationRoundingIncrement ( _unit_ )
-
- RejectObjectWithCalendarOrTimeZone ( _object_ )
-
- The abstract operation RejectObjectWithCalendarOrTimeZone throws an exception if its argument _object_ is an instance of one of the Temporal types that carries a calendar or time zone, or is an object that has a `calendar` or `timeZone` property.
-
+
+
+ RejectTemporalObject (
+ _object_: an Object,
+ ): either a normal completion containing ~unused~, or an abrupt completion
+
+
- 1. Assert: Type(_object_) is Object.
1. If _object_ has an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], [[InitializedTemporalMonthDay]], [[InitializedTemporalTime]], [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal slot, then
1. Throw a *TypeError* exception.
1. Let _calendarProperty_ be ? Get(_object_, *"calendar"*).
@@ -569,6 +573,7 @@ RejectObjectWithCalendarOrTimeZone ( _object_ )
1. Let _timeZoneProperty_ be ? Get(_object_, *"timeZone"*).
1. If _timeZoneProperty_ is not *undefined*, then
1. Throw a *TypeError* exception.
+ 1. Return ~unused~.
@@ -1551,7 +1556,6 @@
[[Millisecond]]: _result_.[[Millisecond]],
[[Microsecond]]: _result_.[[Microsecond]],
[[Nanosecond]]: _result_.[[Nanosecond]],
- [[Calendar]]: _result_.[[Calendar]]
}.
diff --git a/spec/calendar.html b/spec/calendar.html
index 9ff42cec64..99309b001d 100644
--- a/spec/calendar.html
+++ b/spec/calendar.html
@@ -448,13 +448,13 @@ ToTemporalCalendar ( _temporalCalendarLike_ )
1. If Type(_temporalCalendarLike_) is Object, then
1. If _temporalCalendarLike_ has an [[InitializedTemporalCalendar]] internal slot, then
1. Return _temporalCalendarLike_.
- 1. If _temporalCalendarLike_ has an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], [[InitializedTemporalMonthDay]], [[InitializedTemporalTime]], [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal slot, then
+ 1. If _temporalCalendarLike_ has an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], [[InitializedTemporalMonthDay]], [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal slot, then
1. Return _temporalCalendarLike_.[[Calendar]].
- 1. If _temporalCalendarLike_ has an [[InitializedTemporalTimeZone]] internal slot, throw a *RangeError* exception.
+ 1. If _temporalCalendarLike_ has an [[InitializedTemporalTime]] or [[InitializedTemporalTimeZone]] internal slot, throw a *RangeError* exception.
1. If ? HasProperty(_temporalCalendarLike_, *"calendar"*) is *false*, return _temporalCalendarLike_.
1. Set _temporalCalendarLike_ to ? Get(_temporalCalendarLike_, *"calendar"*).
1. If Type(_temporalCalendarLike_) is Object, then
- 1. If _temporalCalendarLike_ has an [[InitializedTemporalTimeZone]] internal slot, throw a *RangeError* exception.
+ 1. If _temporalCalendarLike_ has an [[InitializedTemporalTime]] or [[InitializedTemporalTimeZone]] internal slot, throw a *RangeError* exception.
1. If ? HasProperty(_temporalCalendarLike_, *"calendar"*) is *false*, return _temporalCalendarLike_.
1. Let _identifier_ be ? ToString(_temporalCalendarLike_).
1. Set _identifier_ to ? ParseTemporalCalendarString(_identifier_).
@@ -483,7 +483,7 @@ GetTemporalCalendarWithISODefault ( _item_ )
If no such property is present, the ISO 8601 calendar is returned.
- 1. If _item_ has an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], [[InitializedTemporalMonthDay]], [[InitializedTemporalTime]], [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal slot, then
+ 1. If _item_ has an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], [[InitializedTemporalMonthDay]], [[InitializedTemporalYearMonth]], or [[InitializedTemporalZonedDateTime]] internal slot, then
1. Return _item_.[[Calendar]].
1. Let _calendarLike_ be ? Get(_item_, *"calendar"*).
1. Return ? ToTemporalCalendarWithISODefault(_calendarLike_).
diff --git a/spec/plaindate.html b/spec/plaindate.html
index d5845b0e89..776b214f81 100644
--- a/spec/plaindate.html
+++ b/spec/plaindate.html
@@ -394,7 +394,7 @@ Temporal.PlainDate.prototype.with ( _temporalDateLike_ [ , _options_ ] )
Temporal.PlainDateTime.prototype.with ( _temporalDateTimeLike_ [ , _options_
1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
1. If Type(_temporalDateTimeLike_) is not Object, then
1. Throw a *TypeError* exception.
- 1. Perform ? RejectObjectWithCalendarOrTimeZone(_temporalDateTimeLike_).
+ 1. Perform ? RejectTemporalObject(_temporalDateTimeLike_).
1. Set _options_ to ? GetOptionsObject(_options_).
1. Let _calendar_ be _dateTime_.[[Calendar]].
1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"day"*, *"hour"*, *"microsecond"*, *"millisecond"*, *"minute"*, *"month"*, *"monthCode"*, *"nanosecond"*, *"second"*, *"year"* »).
diff --git a/spec/plainmonthday.html b/spec/plainmonthday.html
index fbd38fb16b..b1ad2fe6a6 100644
--- a/spec/plainmonthday.html
+++ b/spec/plainmonthday.html
@@ -149,7 +149,7 @@ Temporal.PlainMonthDay.prototype.with ( _temporalMonthDayLike_ [ , _options_
1. Perform ? RequireInternalSlot(_monthDay_, [[InitializedTemporalMonthDay]]).
1. If Type(_temporalMonthDayLike_) is not Object, then
1. Throw a *TypeError* exception.
- 1. Perform ? RejectObjectWithCalendarOrTimeZone(_temporalMonthDayLike_).
+ 1. Perform ? RejectTemporalObject(_temporalMonthDayLike_).
1. Set _options_ to ? GetOptionsObject(_options_).
1. Let _calendar_ be _monthDay_.[[Calendar]].
1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"day"*, *"month"*, *"monthCode"*, *"year"* »).
diff --git a/spec/plaintime.html b/spec/plaintime.html
index 1c4eea90b3..9097449e8f 100644
--- a/spec/plaintime.html
+++ b/spec/plaintime.html
@@ -107,19 +107,6 @@ Temporal.PlainTime.prototype[ @@toStringTag ]
-
- get Temporal.PlainTime.prototype.calendar
-
- `Temporal.PlainTime.prototype.calendar` is an accessor property whose set accessor function is *undefined*.
- Its get accessor function performs the following steps:
-
-
- 1. Let _temporalTime_ be the *this* value.
- 1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]).
- 1. Return _temporalTime_.[[Calendar]].
-
-
-
get Temporal.PlainTime.prototype.hour
@@ -232,7 +219,7 @@
Temporal.PlainTime.prototype.with ( _temporalTimeLike_ [ , _options_ ] )
Temporal.PlainTime.prototype.getISOFields ( )
1. Let _temporalTime_ be the *this* value.
1. Perform ? RequireInternalSlot(_temporalTime_, [[InitializedTemporalTime]]).
1. Let _fields_ be OrdinaryObjectCreate(%Object.prototype%).
- 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"calendar"*, _temporalTime_.[[Calendar]]).
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoHour"*, 𝔽(_temporalTime_.[[ISOHour]])).
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMicrosecond"*, 𝔽(_temporalTime_.[[ISOMicrosecond]])).
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMillisecond"*, 𝔽(_temporalTime_.[[ISOMillisecond]])).
@@ -531,14 +517,6 @@ Properties of Temporal.PlainTime Instances
An integer between 0 and 999, inclusive, representing the nanosecond within the microsecond.
-
-
- [[Calendar]]
- |
-
- An instance of the built-in ISO 8601 calendar.
- |
-
@@ -599,17 +577,12 @@ ToTemporalTime ( _item_ [ , _overflow_ ] )
1. Return ! CreateTemporalTime(_plainDateTime_.[[ISOHour]], _plainDateTime_.[[ISOMinute]], _plainDateTime_.[[ISOSecond]], _plainDateTime_.[[ISOMillisecond]], _plainDateTime_.[[ISOMicrosecond]], _plainDateTime_.[[ISONanosecond]]).
1. If _item_ has an [[InitializedTemporalDateTime]] internal slot, then
1. Return ! CreateTemporalTime(_item_.[[ISOHour]], _item_.[[ISOMinute]], _item_.[[ISOSecond]], _item_.[[ISOMillisecond]], _item_.[[ISOMicrosecond]], _item_.[[ISONanosecond]]).
- 1. Let _calendar_ be ? GetTemporalCalendarWithISODefault(_item_).
- 1. If ? ToString(_calendar_) is not *"iso8601"*, then
- 1. Throw a *RangeError* exception.
1. Let _result_ be ? ToTemporalTimeRecord(_item_).
1. Set _result_ to ? RegulateTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _overflow_).
1. Else,
1. Let _string_ be ? ToString(_item_).
1. Let _result_ be ? ParseTemporalTimeString(_string_).
1. Assert: IsValidTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]) is *true*.
- 1. If _result_.[[Calendar]] is not one of *undefined* or *"iso8601"*, then
- 1. Throw a *RangeError* exception.
1. Return ! CreateTemporalTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]).
@@ -738,14 +711,13 @@
1. If IsValidTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is *false*, throw a *RangeError* exception.
1. If _newTarget_ is not present, set _newTarget_ to %Temporal.PlainTime%.
- 1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.PlainTime.prototype%"*, « [[InitializedTemporalTime]], [[ISOHour]], [[ISOMinute]], [[ISOSecond]], [[ISOMillisecond]], [[ISOMicrosecond]], [[ISONanosecond]], [[Calendar]] »).
+ 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. Set _object_.[[Calendar]] to ! GetISO8601Calendar().
1. Return _object_.
diff --git a/spec/plainyearmonth.html b/spec/plainyearmonth.html
index ee2f35db00..d706d71b63 100644
--- a/spec/plainyearmonth.html
+++ b/spec/plainyearmonth.html
@@ -230,7 +230,7 @@ Temporal.PlainYearMonth.prototype.with ( _temporalYearMonthLike_ [ , _option
1. Perform ? RequireInternalSlot(_yearMonth_, [[InitializedTemporalYearMonth]]).
1. If Type(_temporalYearMonthLike_) is not Object, then
1. Throw a *TypeError* exception.
- 1. Perform ? RejectObjectWithCalendarOrTimeZone(_temporalYearMonthLike_).
+ 1. Perform ? RejectTemporalObject(_temporalYearMonthLike_).
1. Set _options_ to ? GetOptionsObject(_options_).
1. Let _calendar_ be _yearMonth_.[[Calendar]].
1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"month"*, *"monthCode"*, *"year"* »).
diff --git a/spec/zoneddatetime.html b/spec/zoneddatetime.html
index fa031e58e7..942f79d190 100644
--- a/spec/zoneddatetime.html
+++ b/spec/zoneddatetime.html
@@ -584,7 +584,7 @@ Temporal.ZonedDateTime.prototype.with ( _temporalZonedDateTimeLike_ [ , _opt
1. Perform ? RequireInternalSlot(_zonedDateTime_, [[InitializedTemporalZonedDateTime]]).
1. If Type(_temporalZonedDateTimeLike_) is not Object, then
1. Throw a *TypeError* exception.
- 1. Perform ? RejectObjectWithCalendarOrTimeZone(_temporalZonedDateTimeLike_).
+ 1. Perform ? RejectTemporalObject(_temporalZonedDateTimeLike_).
1. Set _options_ to ? GetOptionsObject(_options_).
1. Let _calendar_ be _zonedDateTime_.[[Calendar]].
1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"day"*, *"hour"*, *"microsecond"*, *"millisecond"*, *"minute"*, *"month"*, *"monthCode"*, *"nanosecond"*, *"second"*, *"year"* »).