I’m being passed a date that is ‘date time UTC’ such as 2012-03-10 20:00:00 UTC. How can I parse that using Javascript’s Date so that I can get the time until now?
I’m being passed a date that is ‘date time UTC’ such as 2012-03-10 20:00:00
Share
Date.parsecan do it:At least, it can on Google Chrome. If you find any compatibility problems, this will do the trick instead: