-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Open
Labels
Content:JSJavaScript docsJavaScript docsneeds triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Description
MDN URL
What specific section or headline is this issue about?
Examples - Creating a PlainDate from an object
What information was incorrect, unhelpful, or incomplete?
The chinese calendar spec is changed
https://tc39.es/proposal-intl-era-monthcode/#table-epoch-years
// Year, month, day in a different calendar
const d3 = Temporal.PlainDate.from({
year: 2021,
month: 7,
day: 1,
calendar: "chinese",
});
// Note: when you construct a date with an object, the date components
// are in *that* calendar, not the ISO calendar. However, toString() always
// outputs the date in the ISO calendar. For example, the year "2021" in
// the Chinese calendar is actually 616 BC in the ISO calendar.
console.log(d3.toString()); // "-000616-08-12[u-ca=chinese]"
above example shows different toString result 2021-08-08[u-ca=chinese]
What did you expect to see?
MDN can provide better example via choose other calendar like 'hebrew'
Do you have any supporting links, references, or citations?
https://tc39.es/proposal-intl-era-monthcode/#table-epoch-years
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/javascript/reference/global_objects/temporal/plaindate/from - MDN URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/from
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/javascript/reference/global_objects/temporal/plaindate/from/index.md
- Last commit: 544b843
- Document last modified: 2025-07-10T09:07:55.000Z
Metadata
Metadata
Assignees
Labels
Content:JSJavaScript docsJavaScript docsneeds triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.Triage needed by staff and/or partners. Automatically applied when an issue is opened.