Remove "15Z" to for PlainTime.from test

"15Z" will throw RangeError because Z match 
UTCDesignator => 
TimeZoneUTCOffset => 
TimeZoneUTCOffset TimeZoneBracketedAnnotationopt => 
TimeZoneopt 

and "15" match
1 DecimalDigit =>
Hour =>
TimeHour  =>
TimeSpec 

so "15Z" match
TimeSpec TimeZoneopt =>
TimeSpecWithOptionalTimeZoneNotAmbiguous =>
TimeSpecWithOptionalTimeZoneNotAmbiguous Calendaropt =>
CalendarTime  =>
TemporalTimeString 

Therefore 
13.37 ParseTemporalTimeString ( isoString )

https://tc39.es/proposal-temporal/#sec-temporal-parsetemporaltimestring
will succeess in 2. If parseResult is a List of errors, throw a RangeError exception.
but the in step 3
3. If parseResult contains a UTCDesignator Parse Node, throw a RangeError exception.

the "Z" is UTCDesignator so it will throw RangeError.
This commit is contained in:
Frank Yung-Fong Tang 2022-09-14 22:27:33 -07:00 committed by Philip Chimento
parent ce2061eccd
commit aa3afd1c28
1 changed files with 0 additions and 1 deletions

View File

@ -45,7 +45,6 @@ function generateTest(dateTimeString, zoneString) {
"[Europe/Vienna]", "[Europe/Vienna]",
"+01:00[Custom/Vienna]", "+01:00[Custom/Vienna]",
"-04:00", "-04:00",
"Z",
"" ""
].forEach(zoneStr => test(`15${ zoneStr }`, [15])); ].forEach(zoneStr => test(`15${ zoneStr }`, [15]));
[ [