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 .format('eHHmm') returns an expected time string that moment validates as incorrect.
.format('eHHmm')
To Reproduce Steps to reproduce the behavior:
Moment.tz('America/New_York').format('eHHmm')
21530
Moment('21530', 'eHHmm').isValid()
false
Expected behavior These two results should be (at least intuitively) consistent
Desktop (please complete the following information):
Moment-specific environment
Please run the following code in your environment and include the output:
Tue Apr 11 2023 02:55:49 GMT-0400 (Eastern Daylight Time) 4/11/2023, 2:55:49 AM 240 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 2.29.4
Additional context Moment('2-1530', 'e-HHmm') with any separator is, however, valid.
Moment('2-1530', 'e-HHmm')
The text was updated successfully, but these errors were encountered:
Yeah, e reads any number of digits instead of exactly one. You can submit a PR.
e
Sorry, something went wrong.
No branches or pull requests
Describe the bug
.format('eHHmm')
returns an expected time string that moment validates as incorrect.To Reproduce
Steps to reproduce the behavior:
Moment.tz('America/New_York').format('eHHmm')
produces, say,21530
Moment('21530', 'eHHmm').isValid()
returnsfalse
Expected behavior
These two results should be (at least intuitively) consistent
Desktop (please complete the following information):
Moment-specific environment
Please run the following code in your environment and include the output:
Additional context
Moment('2-1530', 'e-HHmm')
with any separator is, however, valid.The text was updated successfully, but these errors were encountered: