Skip to content

spec: NonISOCalendarDateToISO AO seems not to constrain an ordinal month #121

@fabon-f

Description

@fabon-f

The description of NonISOCalendarDateToISO AO states that the AO constrains an invalid date as well as RegulateISODate. While a month code and a day are constrained in the AO, I couldn't find a step which constrains an ordinal month (fields.[[month]]). Is this a spec bug, or did I overlook something?

https://tc39.es/proposal-intl-era-monthcode/#sup-temporal-nonisocalendardatetoiso

Note that all existing implementations clamp (when 'constrain') or reject (when 'reject') an out-of-range ordinal month:

// V8 and SpiderMonkey
Temporal.PlainDate.from({ year: 1, month: 14, day: 1, calendar: 'coptic' }).month; // 13
Temporal.PlainDate.from({ year: 1, month: 14, day: 1, calendar: 'coptic' }, { overflow: 'reject' }); // RangeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions