I am just trying to go from moment to string and then go back to moment .
But this does not work:
f = 'dddd MMMM Do, YYYY' s = 'Friday May 3rd, 2013' d = moment().format(f) # Sunday April 21st, 2013 moment(d, f).format(f) # Monday April 1st, 2013 moment(s, f) # Friday May 3rd, 2013 .format(f) # Wednesday May 1st, 2013
He always parses the serial number on the first day of the month.
Is there something wrong with my formatting? Or how do I expect format() to work?
peter source share