The implementation of Date.parse in Chrome has very unexpected behavior.
For example, Date.parse('foo 2014') should ideally return NaN as it is not a proper date format. But in Chrome this returns the value 1388514600000, which is equivalent to the date "Wed Jan 01 2014 00:00:00 GMT+0530 (India Standard Time)".
As long as the string ends with some sort of year, a proper date value is returned. This will not let us to properly validate dates.
According to ECMAScript this behavior is implementation dependent and chrome does a very loose validation and some how converts to a date.
Is there anyway in chrome to properly validate date without using any library or using heavy logic and matching patterns?