changeset 3468 | 3725487d5468 |
parent 3451 | 302efcf746e0 |
child 3486 | 0d5bb9038e5b |
--- a/svghmi/sprintf.js Fri May 06 11:01:07 2022 +0200 +++ b/svghmi/sprintf.js Fri May 06 11:02:03 2022 +0200 @@ -95,12 +95,12 @@ see meaning of DateTimeFormat's options "datestyle" and "timestyle" in MDN */ - let [datestyle, timestyle] = [ph.width, ph.precision].map(val => { + let [datestyle, timestyle] = [ph.width, ph.precision].map(val => ({ 1: "short", 2: "medium", 3: "long", 4: "full" - }[val]); + }[val])); if(timestyle === undefined && datestyle === undefined){ timestyle = "short";