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

Cannot parse date with meridiem #1373

Closed
chincheta opened this issue Feb 5, 2023 · 2 comments
Closed

Cannot parse date with meridiem #1373

chincheta opened this issue Feb 5, 2023 · 2 comments

Comments

@chincheta
Copy link

Describe the bug
An error "Invalid DateTime" is raised when parsing a date with AM in it and the a token in the format.

To Reproduce
DateTime.fromFormat("Nov 08, 2022, 2 AM Europe/Berlin", "MMM dd, yyyy, h a z", {locale: "en-US"}).toString()

Actual vs Expected behavior
"Invalid DateTime" vs the date being parsed.

Desktop (please complete the following information):

  • OS: Windows and Ubuntu.
  • Browser Firefox.
  • Luxon version 3.2.1
  • Your timezone Europe/Brussels

Additional context
It fails in browser and in a node app.

@chincheta
Copy link
Author

The error was a weird unicode character instead of a normal space.

@dasa
Copy link
Contributor

dasa commented Feb 6, 2023

This may be fixed by #1369

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

2 participants