I'm working on a JavaScript application. I have two different String dates 31/10/2013 and 1/11/2013 and I create an instance of these two dates with new Date(string).getTime();
But it shows this (the same date ) as the result:
console.log(date_s + " after new date " + date ); 31/10/2013 after new date Fri Nov 1 00:00:00 UTC 2013 1/11/2013 after new date Fri Nov 1 00:00:00 UTC 2013
Dateobject with either of your strings results in an invalid date, and callinggetTimeresults inNaN.