For consistent results parsing anything other than ISO 8601 strings, you should use String + Format. 2013-02-08 # A calendar date part 2013-W06-5 # A week date part 2013-039 # An ordinal date part 20130208 # Basic (short) full date 2013W065 # Basic (short) week, weekday 2013W06 # Basic (short) week only 2013050 # Basic (short) ordinal date2013-02-08T09 # An hour time part separated by a T 2013-02-08 09 # An hour time part separated by a space 2013-02-08 # An hour and minute time part 2013-02-08 # An hour, minute, and second time part 2013-02-08 .123 # An hour, minute, second, and millisecond time part 2013-02-08 .000 # hour 24, minute, second, millisecond equal 0 means next day at midnight 20130208T080910,123 # Short date and time up to ms, separated by comma 20130208T080910.123 # Short date and time up to ms 20130208T080910 # Short date and time up to seconds 20130208T0809 # Short date and time up to minutes 20130208T08 # Short date and time, hours only Note: Automatic cross browser ISO-8601 support was added in version 1.5.0.
Support for the week and ordinal formats was added in version 2.3.0.
Parse Now String String + Format String + Formats Special Formats Object Unix Timestamp (milliseconds) Unix Timestamp (seconds) Date Array ASP.
All code should work in both of these environments, and all unit tests are run in both of these environments.
Currently the following browsers are used for the ci system: Chrome on Windows XP, IE 8, 9, and 10 on Windows 7, IE 11 on Windows 10, latest Firefox on Linux, and latest Safari on OSX 10.8 and 10.11.
We strongly recomend reading this if you plan to use moment with
Also upgrade to 2.14.0 or above for best experience.
As a start, you might have aquired moment through bower or node_modules or anything else that places together with a locales directory in a base folder.
Then you should use a tool like adapt-pkg-main, or manually -- using packages config.
then the globally exported moment will print a deprecation warning.
From next major release you'll have to export it yourself if you want that behavior.
For version 2.5.x, in case you use other plugins that rely on Moment but are not AMD-compatible you may need to add .