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 DateTime fromFormat() is considers non-valid 24-hr formats as valid
To Reproduce DateTime.fromFormat('18:30 AM', 'h:mm a').isValid; // = true
Actual vs Expected behavior isValid should return false because 18 is not a valid "h" format
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
Have the same issue. If I parse 16:00 PM and print it with the same format, hours will be converted to 12-h format.
16:00 PM
DateTime.fromFormat('16:00 PM', 'h:mm a').toFormat('h:mm a'); // '4:00 PM'
Sorry, something went wrong.
No branches or pull requests
Describe the bug
DateTime fromFormat() is considers non-valid 24-hr formats as valid
To Reproduce
DateTime.fromFormat('18:30 AM', 'h:mm a').isValid; // = true
Actual vs Expected behavior
isValid should return false because 18 is not a valid "h" format
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: