-
Notifications
You must be signed in to change notification settings - Fork 742
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.fromISO doesn't work with space, but javascript's Date.parse does #1609
Comments
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse and more specifically https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format |
The thing that is confusing is that this spec literally says:
|
I raised that as well, but this was Isaac's response: #990 (comment) |
That literally says
There are no ifs or buts about this, if you want valid ISO 8601, you need to use "T". But all this is really moot, because ISO 8601 is unfortunately not something you can just read for free, as far as I know. |
Describe the bug
A clear and concise description of what the bug is.
When a date has a space between the date and time instead of a
T
, Luxon'sDateTime.fromISO()
does not parse correctly while the built in javascriptDate.parse()
does.I think this is a bug in Luxon and it should properly parse with a space.
To Reproduce
Please share a minimal code example that triggers the problem:
Actual vs Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: