You need to parse the string in JS Date. The Date
constructor is not enough. Maybe you should use a library like datejs:
http://www.datejs.com/
Datejs extends the Date
object with useful methods such as:
Date.parse('Thu, 1 July 2004 22:30:00');
Needless to say, date / time formats are customizable.
source share