The smart way to do this is to (a) parse the date string with a regular expression, (b) construct a date object and (c) compare what you got out of the date object to what you put in.
Parse Now String String Format String Formats Special Formats Object Unix Timestamp (milliseconds) Unix Timestamp (seconds) Date Array ASP.
As of 2.13.0 you can pass a bool as the first parameter of the weekday functions.
If true, the weekdays will be returned in locale specific order.
We strongly recommend reading this if you plan to use moment with
Also upgrade to 2.14.0 or above for best experience.
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 .