Reputation: 7330
I am trying to format the date that is coming from a server, but I am getting an error that date is not valid.
moment("2016-11-31T18:00:00.000+02:00").format('YYYY-MM-DD'); // Invalid date
EDIT: I've checked and if the day is 30 not 31 it works, jsfiddle updated
Upvotes: 1
Views: 1397