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
Trying to parse single digit hours doesn't work correctly when there is no separator character:
dayjs("20240726 931", 'YYYYMMDD Hmm', true).isValid() // false, expected true dayjs("931", 'Hmm', true).isValid() // false, expected true dayjs("20240726 931", 'YYYYMMDD Hmm', true).hour() // 21, expected 9
dayjs("20240726 931", 'YYYYMMDD Hmm', true).isValid() // false, expected true
dayjs("931", 'Hmm', true).isValid() // false, expected true
dayjs("20240726 931", 'YYYYMMDD Hmm', true).hour() // 21, expected 9
If there is a separator between H and mm then result is as expected:
dayjs("20240726 9 31", 'YYYYMMDD H mm', true).isValid() // true, expected true dayjs("9 31", 'H mm', true).isValid() // true, expected true dayjs("9 31", 'H mm', true).hour() // 9, expected 9
dayjs("20240726 9 31", 'YYYYMMDD H mm', true).isValid() // true, expected true
dayjs("9 31", 'H mm', true).isValid() // true, expected true
dayjs("9 31", 'H mm', true).hour() // 9, expected 9
Information
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Trying to parse single digit hours doesn't work correctly when there is no separator character:
dayjs("20240726 931", 'YYYYMMDD Hmm', true).isValid() // false, expected true
dayjs("931", 'Hmm', true).isValid() // false, expected true
dayjs("20240726 931", 'YYYYMMDD Hmm', true).hour() // 21, expected 9
If there is a separator between H and mm then result is as expected:
dayjs("20240726 9 31", 'YYYYMMDD H mm', true).isValid() // true, expected true
dayjs("9 31", 'H mm', true).isValid() // true, expected true
dayjs("9 31", 'H mm', true).hour() // 9, expected 9
Information
The text was updated successfully, but these errors were encountered: