New issue
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
Validate is incorrect #1488
Comments
@KimThi-madi you have spaces around your your format (second parameter), I've reproduced it here and it works as it should: https://codesandbox.io/s/condescending-kalam-nct3j?file=/src/index.js |
Even one from example does not work anymore: |
Version: 1.10.4
Even following is valid, month 90 with strict parse ?!
ok my bad again I forgot that I must do following for parsing to work:
|
exactly @nicewaytodoit, without the customParseFormat, the above examples won't be parsed strict. Please also be aware that your first example with version 1.8.20 doesn't use the latest 1.8.x version (which would be 1.8.36). I was able to reproduce the issue in 1.8.20, but it's fixed in the latest 1.8.x version |
Describe the bug
I'm trying to validate time by using
isValid()
functioncase 1: dayjs("20:22:51"," HH:mm:ss ", true).isValid() ==> This return
false
case 2: dayjs("20:22:61"," HH:mm:ss ", true).isValid() ==> This return
true
Expected behavior
Case 1 should be returned
true
Case 2 should be returned
false
Information
The text was updated successfully, but these errors were encountered: