Skip to content

Commit b86b87f

Browse files
ptomato12wrigja
authored andcommitted
Accept and ignore calendar annotation in Instant string
Parsing an Instant string already ignores the time zone name annotation if one is present, and only takes the offset into account. It's inconsistent to throw if a calendar annotation is present but not if a time zone name annotation is present. UPSTREAM_COMMIT=3cd96697efb2f03120bf0d4c5ad7d3b65d2e20d4
1 parent 375a4ad commit b86b87f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/validStrings.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ const duration = seq(
360360
choice(durationDate, durationTime)
361361
);
362362

363-
const instant = seq(date, [timeSpecSeparator], timeZoneOffsetRequired);
363+
const instant = seq(date, [timeSpecSeparator], timeZoneOffsetRequired, [calendar]);
364364
const zonedDateTime = seq(date, [timeSpecSeparator], timeZoneNameRequired, [calendar]);
365365

366366
// goal elements

0 commit comments

Comments
 (0)