How in JS can I convert this:
var today = "2014-8-20";
to this:
var today = "Wed Aug 20 2014 00:00:00 GMT-0400 (EDT)";
How in JS can I convert this:
var today = "2014-8-20";
to this:
var today = "Wed Aug 20 2014 00:00:00 GMT-0400 (EDT)";
var today = "2014-8-20";
today = new Date(today).toString();
//Wed Aug 20 2014 00:00:00 GMT-0400 (EDT)";
But if you need anything more sophisticated I recommend moment.js