javascript - Invalid Date error on moment.js -
this code
moment("14/5/2015 5:52 am") i don't know why invalid code error come.how can solve issue?
for case, need supply format too:
var m = moment("14/5/2015 5:52 am", 'dd/mm/yyyy h:mm a')
then works expected:
> m.date() 14 > m.month() 4 > m.year() 2015
Comments
Post a Comment