Why when a string of numbers of different length is passed to Date in Javascript sometimes returns a Date Object and sometimes Invalid Date.
For example :
new Date('123456') -> Tue Jan 01 123456 00:00:00 GMT+0530
new Date('1234567') -> Invalid Date
new Date('999999') -> Invalid Date