Many of Moment's functions allow the caller to pass in aliases for unit enums. For example, all of the s below are equivalent.

    1. m.get('y');

    Invalid2.3.0+

    1. moment.invalid(Object);

    You can create your own invalid Moment objects, which is useful in making your own parser.

    1. var m = moment.invalid({invalidMonth: 'Actober'});

    You need not specify parsing flags recognized by Moment; the Moment will be invalid nonetheless, and the parsing flags will be returned by parsingFlags().