Skip to content

Commit 45b000d

Browse files
committed
Editorial: Move calendar validation out of ParseTemporalCalendarString
Similar to #1897, we want to move any validation that is not purely syntactic out of ParseTemporal___String abstract operations. This accomplishes that for Calendar. However, it affects nothing observable, just reorganizes code. Closes: #1901
1 parent d701c12 commit 45b000d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: spec/abstractops.html

-2
Original file line numberDiff line numberDiff line change
@@ -1222,8 +1222,6 @@ <h1>ParseTemporalCalendarString ( _isoString_ )</h1>
12221222
1. Let _id_ be the part of _isoString_ produced by the |CalendarName| production, or *undefined* if not present.
12231223
1. If _id_ is *undefined*, then
12241224
1. Return *"iso8601"*.
1225-
1. If ! IsBuiltinCalendar(_id_) is *false*, then
1226-
1. Throw a *RangeError* exception.
12271225
1. Return _id_.
12281226
</emu-alg>
12291227
</emu-clause>

Diff for: spec/calendar.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ <h1>ToTemporalCalendar ( _temporalCalendarLike_ )</h1>
248248
1. If Type(_temporalCalendarLike_) is Object and ? HasProperty(_temporalCalendarLike_, *"calendar"*) is *false*, return _temporalCalendarLike_.
249249
1. Let _identifier_ be ? ToString(_temporalCalendarLike_).
250250
1. If ! IsBuiltinCalendar(_identifier_) is *false*, then
251-
1. Let _identifier_ be ? ParseTemporalCalendarString(_identifier_).
251+
1. Set _identifier_ to ? ParseTemporalCalendarString(_identifier_).
252+
1. If ! IsBuiltinCalendar(_identifier_) is *false*, throw a *RangeError* exception.
252253
1. Return ! CreateTemporalCalendar(_identifier_).
253254
</emu-alg>
254255
</emu-clause>

0 commit comments

Comments
 (0)