060fc86 Jul 7, 2014
@ichernev @wanthony
19 lines (14 sloc) 668 Bytes
title version signature
Special Formats
moment(String, moment.CUSTOM_FORMAT, [String], [Boolean]); moment(String, [..., moment.ISO_8601, ...], [String], [Boolean]);

ISO-8601 is a standard for time and duration display. Moment already supports parsing iso-8601 strings, but this can be specified explicitly in the format/list of formats when constructing a moment.

To specify iso-8601 parsing use moment.ISO_8601 constant. More formats will be added in the future.


moment("2010-01-01T05:06:07", moment.ISO_8601);
moment("2010-01-01T05:06:07", ["YYYY", moment.ISO_8601]);