Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new Date() broken in IE8 #389

Closed
riophae opened this issue Feb 24, 2016 · 5 comments
Closed

new Date() broken in IE8 #389

riophae opened this issue Feb 24, 2016 · 5 comments

Comments

@riophae
Copy link

riophae commented Feb 24, 2016

var date = new Date(new Date());
// expected to be a valid `Date` Object, got `new Date(NaN)` in IE8 instead

IE8 (with es5-shim):
2016-02-24 16 30 51

IE8 (without es5-shim):
2016-02-24 16 50 26

Chrome:
2016-02-24 16 31 37

@ljharb
Copy link
Member

ljharb commented Feb 24, 2016

Does this happen with just new Date() as well?

@riophae
Copy link
Author

riophae commented Feb 24, 2016

@ljharb No, just new Date() is fine.

@ljharb
Copy link
Member

ljharb commented Feb 24, 2016

hm, interesting, thanks! I'll fix this ASAP.

Curious tho, how did you discover this? Passing a date object into new Date is super odd.

@riophae
Copy link
Author

riophae commented Feb 24, 2016

Haha, we were to copy a Date object by passing it into new Date :D

@ljharb
Copy link
Member

ljharb commented Feb 24, 2016

not new Date(+date)? :-)

@ljharb ljharb closed this as completed in d90b7b6 Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants