Skip to content

Commit

Permalink
Remove "15Z" to for PlainTime.from test
Browse files Browse the repository at this point in the history
"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.
  • Loading branch information
FrankYFTang authored and ptomato committed Sep 15, 2022
1 parent ce2061e commit aa3afd1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion test/staging/Temporal/Regex/old/plaintime.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function generateTest(dateTimeString, zoneString) {
"[Europe/Vienna]",
"+01:00[Custom/Vienna]",
"-04:00",
"Z",
""
].forEach(zoneStr => test(`15${ zoneStr }`, [15]));
[
Expand Down

0 comments on commit aa3afd1

Please sign in to comment.