Closed Bug 1521819 Opened 5 years ago Closed 5 years ago

Implement numberingSystem for RelativeTimeFormat#resolvedOptions

Categories

(Core :: JavaScript: Internationalization API, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: fs, Assigned: anba)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

I've just documented https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/resolvedOptions

The spec mentions "numberingSystem" and I see it added to the spec here https://github.com/tc39/proposal-intl-relative-time/pull/100

It doesn't seem to be added to our implementation yet.
PR for tests: https://github.com/tc39/test262/pull/2011

var de = new Intl.RelativeTimeFormat('de-DE');
de.resolvedOptions();
// Object { locale: "de-DE", style: "long", numeric: "always" }

Would have expected:
// Object { locale: "de-DE", style: "long", numeric: "always", numberingSystem: "latn" }

Keywords: dev-doc-needed

I have a patch for this bug, but as it currently requires a workaround for https://unicode-org.atlassian.net/browse/ICU-20280, it probably makes more sense to wait until bug 1533481 lands, because ICU-20280 has been fixed in ICU 64.

Assignee: nobody → andrebargull
Status: NEW → ASSIGNED

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:anba, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(andrebargull)

Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e3ffa96d1b94
Add numberingSystem support to Intl.RelativeTimeFormat. r=jwalden

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

(In reply to Florian Scholz [:fscholz] (MDN) from comment #8)

Added to Fx 70 release notes: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/70#JavaScript

The release notes should probably also mention that the Unicode extension key "nu" is now supported for the Intl.RelativeTimeFormat constructor.

For example before this bug new Intl.RelativeTimeFormat("th-u-nu-thai").format(123, "days") returned "ในอีก 123 วัน", but now the return value is "ในอีก ๑๒๓ วัน".

Updated the text on the release notes. Thank you!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: