I'm using the moment.js library to format dates in the format MM DD, YYYY. What am I missing?
Code below:
import moment from 'moment';
var dateStr = '2015-10-19T13:33:52.140Z';
var d = new Date(dateStr); // Mon Oct 19 2015 13:33:52 GMT+0000 (GMT)
console.log( moment(d, "MM DD, YYYY").toDate() ) // Still outputs Mon Oct 19 2015 13:33:52 GMT+0000 (GMT)