Skip to content

spec: alleged issues about Temporal.PlainMonthDay construction from fields #123

@fabon-f

Description

@fabon-f

I found few alleged spec issues:

  • Assertions of the end of NonISOResolveFields and the beginning of NonISOMonthDayToISOReferenceDate about fields.[[Month]] can fail because fields.[[Month]] is UNSET when type is MONTH-DAY and only [[monthCode]] and [[day]] exist (e.g. Temporal.PlainMonthDay.from({ monthCode: 'M01', day: 1, calendar: 'hebrew' })).
  • Similar to spec: NonISOCalendarDateToISO AO seems not to constrain an ordinal month #121, NonISOMonthDayToISOReferenceDate seems not to constrain fields.[[month]].
  • NonISOMonthDayToISOReferenceDate performs ConstrainMonthCode when the calendar is neither "chinese" nor "dangi", but it doesn't when the calendar is "chinese" or "dangi". Thus, for example, Temporal.PlainMonthDay.from({ year: 2026, monthCode: 'M05L', day: 1, calendar: 'chinese' }, { overflow: 'reject' }) doesn't throw according to the spec even though M05L doesn't exist in 2026. However it actually throws in V8, SpiderMonkey, and the reference polyfill. Note that "hebrew" calendar doesn't have this problem.
  • The call of CalendarIntegersToISO in the step 4. e. iii. 1. can violate the assertion of CalendarIntegersToISO when day is 30 and the specified month has only 29 days.

Metadata

Metadata

Assignees

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