What does the parameter "true" mean in moment.js? For instance:
moment("2010-10-31a", ["YYYY-MM-DD"], true).isValid();
Note under String + Format in the documentation, down the page a bit, there's the line:
As of version 2.3.0, you may specify a boolean for the last argument to make Moment use strict parsing. Strict parsing requires that the format and input match exactly, including delimeters.
Since it was obvious it was under the String + Format section (because that's where it shows the moment method signatures), I just navigated to there on the page, then searched for "boolean". Sure enough, that brought me to the part above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With