Closed
Bug 1789905
Opened 2 years ago
Closed 2 years ago
formatBestUnit() in intl.RelativeTimeFormat should support weeks
Categories
(Core :: Internationalization, enhancement)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
106 Branch
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: flod, Assigned: Gijs)
References
Details
Attachments
(1 file)
For some reason, we seem to jump from day to month, with some awkward results when the difference is just over a week
https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIntl.sys.mjs#769
var now = Date.now();
var rtf = new Services.intl.RelativeTimeFormat("en", {
style: "short", // "narrow" | "short" | "long" (default)
numeric: "auto", // "always" | "auto" (default)
});
console.log(rtf.formatBestUnit(new Date(now - 8 * 24 * 60 * 1000 * 60)));
// last mo.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4687a0580982
add 'week' support to mozIntl's formatbestUnit code, r=jfkthame
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox106:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•