So, I tried to find the last Dateone that can handle Javascript.
I got to September 275760 and increased the days when I started getting an exception illegal accessfrom illegal accessfrom new Date('09/24/275760')to new Date('10/13/275760'). Before new Date('09/24/275760'), it new Dateworked fine and gave it to me Invalid Date, and after new Date('10/13/275760')that, new Dateit started working normally again and gave it to me Invalid Date.
I looked at the error stack and it came from the command line interface, which was not very useful (except for the fact that it meant that the error came from the internal code).
So the question is, why is it new Datethrowing an error instead of following the specific behavior of the grant Invalid Dateon these specific dates?
I am running Chrome 43.0.2357.81 (64-bit) (Official Build) on Mac OSX Yosemite (10.10.3).
Edit
This only happens when I use strings (EX:) new Date('10/01/275760'). See JSFiddle . However, when using integer arguments (EX:), new Date(275760, 10, 1)it works fine. Thanks to @abhitalks for finding this.
source
share