Closed Bug 1504334 Opened 6 years ago Closed 6 years ago

Ship Intl.RelativeTimeFormat

Categories

(Core :: JavaScript: Internationalization API, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Intl.RelativeTimeFormat is already used internally (through MozIntl) and we didn't find any blocking issues which may prevent exposing the new object to normal web users. 

Support for Intl.RelativeTimeFormat.prototype.formatToParts will land at a later time (bug 1473229).
Attached patch bug1504334.patchSplinter Review
Updated step numbers in js/src/builtin/intl/RelativeTimeFormat.js and some additional minor changes to reflect the latest proposal updates. The rest of the patch is mostly enabling Intl.RelativeTimeFormat by default and removing the conditional support through |js::AddRelativeTimeFormatConstructor|.
Attachment #9022290 - Flags: review?(jwalden+bmo)
Attachment #9022290 - Flags: review?(gandalf)
Comment on attachment 9022290 [details] [diff] [review]
bug1504334.patch

Review of attachment 9022290 [details] [diff] [review]:
-----------------------------------------------------------------

hell yeah! Thank you Andrew!
Attachment #9022290 - Flags: review?(gandalf) → review+
Depends on: 1504656
Attachment #9022290 - Flags: review?(jwalden+bmo) → review+
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/69b08ee5925d
Let Intl.RelativeTimeFormat ride the trains.  r=jwalden, r=gandalf
https://hg.mozilla.org/mozilla-central/rev/69b08ee5925d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Hi Florian, can you help me promote this on MDN? This API got some recent traction because we and V8 exposed it, and I'd love to link people to MDN rather than any other sources ;)
Flags: needinfo?(fscholz)
Hi Zibi,

Sorry for not being more responsive on this. I just added a note to the Fx65 rel notes for cover this addition:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#JavaScript

And one of our contributors added this page:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat

We still need to make sure this is linked up properly, e.g. in places like
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl

I'll try to get to these final checks in the next few days, before breaking up for Xmas vacation.
Flags: needinfo?(fscholz)
Depends on: 1270140

LGTM Chris. Remaining doc work is also tracked here now: https://github.com/tc39/proposal-intl-relative-time/issues/102

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

Attachment

General

Created:
Updated:
Size: