mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:57:34 +00:00
LibJS: Do not override hour, minute, and second format field lengths
This was an oversight in e42d954743
.
These fields should always follow the locale preference in the CLDR.
Overriding these fields would permit formats like "h:mm:ss" to result in
strings like "1:2:3" instead of "1:02:03".
This commit is contained in:
parent
9f7c727720
commit
26f9666191
2 changed files with 7 additions and 2 deletions
|
@ -165,14 +165,14 @@ describe("correct behavior", () => {
|
|||
test("minute", () => {
|
||||
["2-digit", "numeric"].forEach(minute => {
|
||||
const en = new Intl.DateTimeFormat("en", { minute: minute });
|
||||
expect(en.resolvedOptions().minute).toBe(minute);
|
||||
expect(en.resolvedOptions().minute).toBe("2-digit");
|
||||
});
|
||||
});
|
||||
|
||||
test("second", () => {
|
||||
["2-digit", "numeric"].forEach(second => {
|
||||
const en = new Intl.DateTimeFormat("en", { second: second });
|
||||
expect(en.resolvedOptions().second).toBe(second);
|
||||
expect(en.resolvedOptions().second).toBe("2-digit");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue