Skip to content
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

DateTime fromFormat() is considers non-valid 24-hr formats as valid #1625

Open
eh1160 opened this issue May 14, 2024 · 0 comments
Open

DateTime fromFormat() is considers non-valid 24-hr formats as valid #1625

eh1160 opened this issue May 14, 2024 · 0 comments

Comments

@eh1160
Copy link

eh1160 commented May 14, 2024

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):

  • OS: MacOs Sonoma 14.2.1
  • Browser Chrome Version 124.0.6367.119 (Official Build) (arm64)
  • Luxon version ^3.4.4
  • Your timezone "America/New_York"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant