mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
LibJS: Change digital default style from "narrow" to "short"
This is a normative change in the Intl.DurationFormat proposal. See:
4c24876
This commit is contained in:
parent
51854e345a
commit
60a6bae53d
3 changed files with 13 additions and 13 deletions
|
@ -32,7 +32,7 @@ describe("correct behavior", () => {
|
|||
"1y 2m 3w 3d 4h 5m 6s 7ms 8μs 9ns"
|
||||
);
|
||||
expect(new Intl.DurationFormat("en", { style: "digital" }).format(duration)).toBe(
|
||||
"1y 2m 3w 3d 4:05:06"
|
||||
"1 yr 2 mths 3 wks 3 days 4:05:06"
|
||||
);
|
||||
expect(
|
||||
new Intl.DurationFormat("en", {
|
||||
|
@ -52,7 +52,7 @@ describe("correct behavior", () => {
|
|||
"1 J, 2 M, 3 W, 3 T, 4 Std., 5 Min., 6 Sek., 7 ms, 8 μs und 9 ns"
|
||||
);
|
||||
expect(new Intl.DurationFormat("de", { style: "digital" }).format(duration)).toBe(
|
||||
"1 J, 2 M, 3 W, 3 T und 4:05:06"
|
||||
"1 J, 2 Mon., 3 Wo., 3 Tg. und 4:05:06"
|
||||
);
|
||||
expect(
|
||||
new Intl.DurationFormat("de", {
|
||||
|
|
|
@ -123,13 +123,13 @@ describe("correct behavior", () => {
|
|||
]);
|
||||
expect(new Intl.DurationFormat("en", { style: "digital" }).formatToParts(duration)).toEqual(
|
||||
[
|
||||
{ type: "element", value: "1y" },
|
||||
{ type: "element", value: "1 yr" },
|
||||
{ type: "literal", value: " " },
|
||||
{ type: "element", value: "2m" },
|
||||
{ type: "element", value: "2 mths" },
|
||||
{ type: "literal", value: " " },
|
||||
{ type: "element", value: "3w" },
|
||||
{ type: "element", value: "3 wks" },
|
||||
{ type: "literal", value: " " },
|
||||
{ type: "element", value: "3d" },
|
||||
{ type: "element", value: "3 days" },
|
||||
{ type: "literal", value: " " },
|
||||
{ type: "element", value: "4:05:06" },
|
||||
]
|
||||
|
@ -227,11 +227,11 @@ describe("correct behavior", () => {
|
|||
[
|
||||
{ type: "element", value: "1 J" },
|
||||
{ type: "literal", value: ", " },
|
||||
{ type: "element", value: "2 M" },
|
||||
{ type: "element", value: "2 Mon." },
|
||||
{ type: "literal", value: ", " },
|
||||
{ type: "element", value: "3 W" },
|
||||
{ type: "element", value: "3 Wo." },
|
||||
{ type: "literal", value: ", " },
|
||||
{ type: "element", value: "3 T" },
|
||||
{ type: "element", value: "3 Tg." },
|
||||
{ type: "literal", value: " und " },
|
||||
{ type: "element", value: "4:05:06" },
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue