LibJS: Use Intl.DurationFormat for Temporal.Duration.p.toLocaleString

This is an normative change in the Temporal proposal. See:
ffb4fb5
This commit is contained in:
Timothy Flynn 2025-02-28 14:06:02 -05:00 committed by Andreas Kling
commit 080d32c7d0
Notes: github-actions[bot] 2025-03-01 13:50:19 +00:00
2 changed files with 27 additions and 4 deletions

View file

@ -5,7 +5,7 @@ describe("correct behavior", () => {
test("basic functionality", () => {
expect(new Temporal.Duration(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).toLocaleString()).toBe(
"P1Y2M3W4DT5H6M7.00800901S"
"1 yr, 2 mths, 3 wks, 4 days, 5 hr, 6 min, 7 sec, 8 ms, 9 μs, 10 ns"
);
});
});