diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-12-07 08:45:55 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-12-08 11:29:36 +0000 |
commit | 26f966619139bedc56f1a6939f832e6936647df6 (patch) | |
tree | a0b1185f01b94c6203dc01f3b2af7500e0f03d31 /Userland/Libraries/LibJS/Tests | |
parent | 9f7c7277201df5649a6b229d73e2273835b873ff (diff) | |
download | serenity-26f966619139bedc56f1a6939f832e6936647df6.zip |
LibJS: Do not override hour, minute, and second format field lengths
This was an oversight in e42d954743056e476bbb1623cfc60e7797a8a6ca.
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".
Diffstat (limited to 'Userland/Libraries/LibJS/Tests')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/builtins/Intl/DateTimeFormat/DateTimeFormat.prototype.resolvedOptions.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Intl/DateTimeFormat/DateTimeFormat.prototype.resolvedOptions.js b/Userland/Libraries/LibJS/Tests/builtins/Intl/DateTimeFormat/DateTimeFormat.prototype.resolvedOptions.js index da70832e14..e9157c799c 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/Intl/DateTimeFormat/DateTimeFormat.prototype.resolvedOptions.js +++ b/Userland/Libraries/LibJS/Tests/builtins/Intl/DateTimeFormat/DateTimeFormat.prototype.resolvedOptions.js @@ -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"); }); }); |