Closed Bug 1839694 Opened 2 years ago Closed 6 months ago

[meta] Add Intl support for Temporal

Categories

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

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: anba, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: meta, Whiteboard: [platform-feature])

User Story

platform-scheduled:2025-06-30

Meta bug to cover adding Intl support for the Temporal proposal. Includes:

  • Adding support for more calendars besides the ISO-8601 calendar.
  • Adding support to format Temporal objects in Intl.DateTimeFormat.
  • More?

Time zone support is already provided in the initial patch stack from bug 1519167.

Summary: Add Intl support for Temporal → [meta] Add Intl support for Temporal
Severity: -- → N/A
Priority: -- → P3

:anba - now that ICU4X landed (bug 1719535) - would you consider using it for this (over ICU4C)? We believe ICU4X to be way better aligned to Temporal than ICU4C is resulting in much leaner internal code, leaner payload and faster performance.

It's still the plan to use ICU4X for calendrical computations. Formatting through Intl.DateTimeFormat will still use ICU4C, because Intl.DateTimeFormat uses ICU4C. The next big Temporal tasks are https://github.com/tc39/proposal-temporal/pull/2519 and https://github.com/tc39/proposal-temporal/pull/2612, because both modify internal data structures and execution flow. Calendar support will likely happen after those two PRs are implemented.

Depends on: 1899177
Whiteboard: webcompat:risk-high
User Story: (updated)
Depends on: 1937552

Removing the parity and webcompat risk flags, since Chrome and WebKit haven't actually shipped yet, so the risk is lower than I had assessed earlier.

Whiteboard: webcompat:risk-high

Intl.DurationFormat works for Temporal Durations, but toLocaleString() does not work for Temporal Durations in Firefox.

Depends on: 1941372

(In reply to oliverwilliams345 from comment #4)

Intl.DurationFormat works for Temporal Durations, but toLocaleString() does not work for Temporal Durations in Firefox.

Locale-sensitive Temporal.Duration.prototype.toLocaleString isn't yet specified, therefore only the non-locale sensitive version is implemented. It's clear how the specification for the locale-sensitive version should look like, so we could implement it ahead of time, but I don't know if we should implement it without an official spec. (I also don't know when the specification will happen, the tracking issue appears to be https://github.com/tc39/proposal-temporal/issues/452.)

Depends on: 1974768
Depends on: 1972489

(I'm not sure if this is right place to comment) Since bug 1960300 is resolved now it's ok to enable islamic-umalqura calendar by default? (cf. bug 1912511, comment 22)

Whiteboard: [platform-feature]

All the dependent bugs are fixed, and we'd likely track issues using the main temporal meta bug, Bug 1839673, so I'm going to mark this as fixed.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.