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

Date constructor is not working in chrome properly #171

Open
GoogleCodeExporter opened this issue Nov 30, 2015 · 3 comments
Open

Date constructor is not working in chrome properly #171

GoogleCodeExporter opened this issue Nov 30, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

I'm passing values to date constructor as below,

new Date("5/0/2014").

So Ideally it should return me below value

Wed Apr 30 2014 00:00:00 GMT+0530 (India Standard Time).

Where as it is returning Invalid date and the same code is working fine in IE 
and FireFox.


My Chrome Version:  26.0.1410.64 m

Operating System : Windows XP

Please let me know where is the issue? 

Original issue reported on code.google.com by [email protected] on 19 Apr 2013 at 9:03

@GoogleCodeExporter
Copy link
Author

No body is there to help me on this?

Original comment by [email protected] on 10 May 2013 at 5:06

@GoogleCodeExporter
Copy link
Author

Confirmed. Also happens on Mac, obviously, but it's a Webkit issue it seems.

Interesting issue. Obviously 5/0/2014 is actually an invalid date so this is 
sort of correct behavior and you may be left with it being an edge case as I'd 
say that FF and IE are actually wrong here...

That said - ported the issue over to my fork and will be taking a look at it: 
https://github.com/abritinthebay/datejs/issues/170

Original comment by [email protected] on 9 Sep 2013 at 8:14

@GoogleCodeExporter
Copy link
Author

Confirmed - it's due to FF and IE being overly permissive. There is no reason 
why they should allow 0 to go to the previous month.

I've marked it as wontfix in my fork and I doubt anyone will fix it here either.

Original comment by [email protected] on 19 Sep 2013 at 9:06

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

1 participant