3 category: JavaScript libraries
12 m = moment('2013-03-01', 'YYYY-MM-DD')
15 This parses the given date using the given format. Returns a moment object.
20 m.format() // "2013-03-01T00:00:00+01:00"
21 m.format('dddd') // "Friday"
22 m.format('MMM Do YY') // "Mar 1st 13"
23 m.fromNow() // "7 years ago"
24 m.calendar() // "03/01/2013"
40 ### Internationalization
43 .format('L') // 06/09/2014
44 .format('l') // 6/9/2014
45 .format('LL') // June 9 2014
46 .format('ll') // Jun 9 2014
47 .format('LLL') // June 9 2014 9:32 PM
48 .format('lll') // Jun 9 2014 9:32 PM
49 .format('LLLL') // Monday, June 9 2014 9:32 PM
50 .format('llll') // Mon, Jun 9 2014 9:32 PM
53 See [datetime](./datetime) for more.
55 {% include common/moment_format.md title="Formatting" %}
61 * [You don't need Moment.js](https://github.com/you-dont-need/You-Dont-Need-Momentjs) _(github.com)_
65 * [Datetime cheatsheet](./datetime) _(devhints.io)_
66 * [Moment website](http://momentjs.com/) _(momentjs.com)_
67 * [Moment docs](http://momentjs.com/docs/) _(momentjs.com)_