RESOLVED FIXED 185563
TimeClip's incorrect ToInteger
https://bugs.webkit.org/show_bug.cgi?id=185563
Summary TimeClip's incorrect ToInteger
Leo Balter
Reported 2018-05-11 14:09:38 PDT
From the test262 runner (https://build.webkit.org/builders/Apple%20Sierra%20Release%20Test262%20%28Tests%29/builds/2187/steps/test262-test/logs/stdio) - test/intl402/DateTimeFormat/prototype/format/time-clip-to-integer.js - test/intl402/DateTimeFormat/prototype/formatToParts/time-clip-to-integer.js Intl.DateTimeFormat#format calls are not properly extracting the ToInteger value from its first argument. ``` var dtf = new Intl.DateTimeFormat(undefined, { hour: "numeric", minute: "numeric", second: "numeric" }); dtf.format(-0.9) // expects dtf.format(0) ``` Currently returning the same as `dtf.format(-1)` --- Also affects Intl.DateTimeFormat#formatToParts: ``` var dtf = new Intl.DateTimeFormat(undefined, { hour: "numeric", minute: "numeric", second: "numeric" }); function formatAsString(dtf, time) { return dtf.formatToParts(time).map(part => part.value).join(""); } formatAsString(dtf, -0.9) // expects formatAsString(dtf, 0) ``` Currently returning the same as `formatAsString(dtf, -1)`
Attachments
Leo Balter
Comment 1 2018-05-14 08:04:03 PDT
Sounds like this is fixed by the Bug 185578 / https://trac.webkit.org/changeset/231740
Radar WebKit Bug Importer
Comment 2 2018-05-14 08:05:14 PDT
Note You need to log in before you can comment on or make changes to this bug.