Skip to content

Add Intl.{Duration,DateTime,RelativeTime}Format option keys to domprops#1680

Merged
fabiosantoscode merged 1 commit into
terser:masterfrom
thomasbachem:add-intl-temporal-domprops
May 7, 2026
Merged

Add Intl.{Duration,DateTime,RelativeTime}Format option keys to domprops#1680
fabiosantoscode merged 1 commit into
terser:masterfrom
thomasbachem:add-intl-temporal-domprops

Conversation

@thomasbachem

Copy link
Copy Markdown
Contributor

Closes #1679.

Adds the field/option names used by Intl.DurationFormat, Intl.DateTimeFormat, and Intl.RelativeTimeFormat to tools/domprops.js, so mangle.properties doesn't silently break code like:

new Intl.DurationFormat('en').format({ hours: 1, minutes: 30 });
new Intl.DateTimeFormat('en', { timeZoneName: 'short' }).formatToParts(new Date());
new Intl.RelativeTimeFormat('en', { numeric: 'auto' }).format(-1, 'day');

Sibling change to #1652, which added Temporal, Duration, and DurationFormat class names but not their record/option fields. The singular forms (year, month, day, hour, minute, second) also cover Temporal record fields.

29 entries total, alphabetically merged into the existing list:

  • DurationFormat: years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds
  • DateTimeFormat: weekday, era, year, month, day, dayPeriod, hour, minute, second, fractionalSecondDigits, hour12, hourCycle, dateStyle, timeStyle, timeZone, timeZoneName, calendar, numberingSystem
  • RelativeTimeFormat: numeric

npm test (246 passing), npm run lint, and npm run ls-lint all pass.

@fabiosantoscode

Copy link
Copy Markdown
Collaborator

Thank you!

@fabiosantoscode fabiosantoscode merged commit 2d52ff3 into terser:master May 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Intl.DurationFormat / Intl.DateTimeFormat / Intl.RelativeTimeFormat option keys to domprops.js

2 participants