Bug 187519 - Date constructor with negative value argument
Summary: Date constructor with negative value argument
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-10 08:38 PDT by gfablima
Modified: 2018-07-12 11:33 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gfablima 2018-07-10 08:38:46 PDT
Hi everyone,

I found an inconsistence on Date() with a negative value.
I was looking on ES6 specification about this issue but I didn't found an answer, maybe the correct way is convert the -0 to +0
as V8 and SpiderMonkey do.

Steps to reproduce:
```
d = new Date(-0);
print(Object.is(d.getTime(), +0))
```

Actual results:
false

Expected results:
true

V8 and SpiderMonkey works as expected.

OS: Ubuntu 16.04 x64
Version: 606.1.9.4
Comment 1 isol2 2018-07-12 11:33:00 PDT
Daily build v233772 not reproduce this issue