[Webkit-unassigned] [Bug 188378] New: Date.UTC should not return NaN with only Year param

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 7 04:37:49 PDT 2018


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

            Bug ID: 188378
           Summary: Date.UTC should not return NaN with only Year param
           Product: WebKit
           Version: Safari 11
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: isol2 at cin.ufpe.br

Hi everyone,
there is a inconsistency on JSC when we try to get Date.UTC passing only the year param.
According to ES6 specs (https://www.ecma-international.org/ecma-262/8.0/index.html#sec-date.utc) the year param is required, the others params are optional.

JSC build: 234555
OS: Ubuntu 16.04 x64

Steps to reproduce:
d = Date.UTC(2015);
print(isNaN(d));

d = Date.UTC(2000 + 15, 0);
print(d == 1420070400000);


Actual results:
true
true

Expected results:
false
true

Chakra, V8 and SpiderMonkey works as expected.

cinfuzz

-- 
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/20180807/47d29057/attachment.html>


More information about the webkit-unassigned mailing list