Skip to content

Coverage gap: Incorrect behaviour at end of range for Chinese calendar #3081

@ptomato

Description

@ptomato

Spotted by @Josh-Cena

const d = Temporal.PlainDate.from("+275760-09-13").withCalendar("chinese");
d.year; // RangeError
d.toPlainYearMonth(); // RangeError

This behaviour is not allowed by the spec. Any valid PlainDate must have a valid year property. The toPlainYearMonth method might throw at the beginning of the range if the first of the calendar month is outside the ISOPlainYearMonth range, but I believe that can't happen at the end of the range.

This behaviour isn't covered by test262. Firefox apparently has this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    non-prod-polyfillTHIS POLYFILL IS NOT FOR PRODUCTION USE!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions