[Webkit-unassigned] [Bug 185563] New: TimeClip's incorrect ToInteger

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 11 14:09:38 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185563

            Bug ID: 185563
           Summary: TimeClip's incorrect ToInteger
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: leonardo.balter at gmail.com

>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)`

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180511/b44ecbb5/attachment.html>


More information about the webkit-unassigned mailing list