usha123 / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

Date constructor is not working in chrome properly #171

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 arunvell...@gmail.com on 19 Apr 2013 at 9:03

GoogleCodeExporter commented 8 years ago
No body is there to help me on this?

Original comment by arunvell...@gmail.com on 10 May 2013 at 5:06

GoogleCodeExporter commented 8 years ago
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 darkcr...@gmail.com on 9 Sep 2013 at 8:14

GoogleCodeExporter commented 8 years ago
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 darkcr...@gmail.com on 19 Sep 2013 at 9:06