We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug moment('31-10-2021', 'YYYY-MM-DD').isValid() is giving true when it's not.
moment('31-10-2021', 'YYYY-MM-DD').isValid()
To Reproduce Steps to reproduce the behavior:
Expected behavior moment('31-10-2021', 'YYYY-MM-DD').isValid() //false
moment('31-10-2021', 'YYYY-MM-DD').isValid() //false
The text was updated successfully, but these errors were encountered:
As mentioned in the doc, YYYY : 4 or 2 digit year. Note: Only 4 digit can be parsed on strict mode
Pass the third param which sets the strict mode as true
moment('31-10-2021','YYYY-MM-DD',true).isValid() // false moment('31-10-2021','DD-MM-YYYY',true).isValid() // true
moment('31-10-2021','YYYY-MM-DD',true).isValid() // false
moment('31-10-2021','DD-MM-YYYY',true).isValid() // true
Sorry, something went wrong.
No branches or pull requests
Describe the bug
moment('31-10-2021', 'YYYY-MM-DD').isValid()
is giving true when it's not.To Reproduce
Steps to reproduce the behavior:
Expected behavior
moment('31-10-2021', 'YYYY-MM-DD').isValid() //false
The text was updated successfully, but these errors were encountered: