Skip to content

Missing text and the same code output #37609

@antracer

Description

@antracer

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts

What specific section or headline is this issue about?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts#named_years_and_mixed_calendars

What information was incorrect, unhelpful, or incomplete?

"Setting an entry in the bag for year (with any value) will yield both the and the yearName Gregorian relatedYear:"

Also the same output of 2 code blocks below the text:

// return value
[
  { type: "relatedYear", value: "2012" },
  { type: "literal", value: "年" },
  { type: "month", value: "十一月" },
  { type: "day", value: "4" },
];

What did you expect to see?

Maybe "Setting an entry in the bag for year (with any value) will yield both the yearName and the Gregorian relatedYear:"

Then, for the first code block:

// return value
[
+ { type: "yearName", value: "zh-u-ca-chinese" },
  { type: "relatedYear", value: "2012" },
  { type: "literal", value: "年" },
  { type: "month", value: "十一月" },
  { type: "day", value: "4" },
];

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions