Closed Bug 1978239 Opened 1 year ago Closed 11 months ago

Temporal's "constrain" behavior in "chinese" and "dangi" calendars is not spec-compliant

Categories

(Core :: JavaScript: Standard Library, defect, P3)

defect

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: fabon, Assigned: anba)

References

(Blocks 2 open bugs)

Details

Attachments

(1 external file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) Gecko/20100101 Firefox/140.0

Steps to reproduce:

console.log(
  Temporal.PlainDate.from({
    year: 2025,
    monthCode: "M07L",
    day: 1,
    calendar: "chinese",
  }).monthCode, // "M07L" doesn't exist in 2025, should be "M07"
  Temporal.PlainDate.from({
    year: 2025,
    monthCode: "M06L",
    day: 1,
    calendar: "chinese",
  }).with({ year: 2024 }).monthCode, // "M06L" doesn't exist in 2024, should be "M06"
);

Actual results:

console output is M08 M07

Expected results:

console output should be M07 M06 according to https://github.com/tc39/proposal-intl-era-monthcode/pull/47

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript: Standard Library' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → JavaScript: Standard Library
Product: Firefox → Core
Blocks: sm-runtime
Severity: -- → S3
Priority: -- → P3
Blocks: temporal
Assignee: nobody → andrebargull
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Regressions: 2003998
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: