How to parse a string into a date object at JavaScript (without using any 3d party) that is at dd-MM-yyyy HH:mm (all of them numbers) format?
2 Answers
DateJS is your friend: http://www.datejs.com/
It parses pretty much anything reasonable you throw at it:
// Convert text into Date
Date.parse('today');
Date.parse('t + 5 d'); // today + 5 days
Date.parse('next thursday');
Date.parse('February 20th 1973');
Date.parse('Thu, 1 July 2004 22:30:00');
It's not perfect, but it does a pretty good job.
Date.parse(), so you would have to write your own parser. Or use a 3d party library/function.