In the developer console of any of your browser type

new Date('01/01/01')

The correct answer should be (ignore the timezone, you might get a different one)

Tue Jan 01 1901 00:00:00 GMT-0600 (Central Standard Time)

Strangely chrome gives the following answer

Mon Jan 01 2001 00:00:00 GMT-0600 (Central Standard Time)

The initial reaction of any developer is that chrome is correct and IE is wrong, however according the ECMAScript spec
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-date.utc

If y is not NaN and 0 ≤ ToInteger(y)99, let yr be 1900+ToInteger(y); otherwise, let yr be y.

So the lesson I learnt from this experience is not to take the side of any browser before doing the due investigation.

“Even today Browsers are consistently inconsistent”
-Rushi

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>