-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support parsing String into DateTime values #677
Labels
Milestone
Comments
yorickpeterse
added a commit
that referenced
this issue
Dec 20, 2024
This adds the method std.time.DateTime.parse and associated types to support locale-aware date/time parsing. DateTime.parse uses a format string similar to that of strftime(2)/strptime(2), and supports different locales (English, Dutch and Japanese are included). The list of supported formatting sequences is limited to the essentials, but we can expand this over time where necessary. This fixes #677. Changelog: added
yorickpeterse
added a commit
that referenced
this issue
Dec 20, 2024
This adds the method std.time.DateTime.parse and associated types to support locale-aware date/time parsing. DateTime.parse uses a format string similar to that of strftime(2)/strptime(2), and supports different locales (English, Dutch and Japanese are included). The list of supported formatting sequences is limited to the essentials, but we can expand this over time where necessary. This fixes #677. Changelog: added
yorickpeterse
added a commit
that referenced
this issue
Dec 20, 2024
This adds the method std.time.DateTime.parse and associated types to support locale-aware date/time parsing. DateTime.parse uses a format string similar to that of strftime(2)/strptime(2), and supports different locales (English, Dutch and Japanese are included). The list of supported formatting sequences is limited to the essentials, but we can expand this over time where necessary. This fixes #677. Changelog: added
yorickpeterse
added a commit
that referenced
this issue
Dec 20, 2024
This adds the method std.time.DateTime.parse and associated types to support locale-aware date/time parsing. DateTime.parse uses a format string similar to that of strftime(2)/strptime(2), and supports different locales (English, Dutch and Japanese are included). The list of supported formatting sequences is limited to the essentials, but we can expand this over time where necessary. This fixes #677. Changelog: added
yorickpeterse
added a commit
that referenced
this issue
Dec 21, 2024
This adds the method std.time.DateTime.parse and associated types to support locale-aware date/time parsing. DateTime.parse uses a format string similar to that of strftime(2)/strptime(2), and supports different locales (English, Dutch and Japanese are included). The list of supported formatting sequences is limited to the essentials, but we can expand this over time where necessary. This fixes #677. Changelog: added
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Similar to many other languages, we should add support for parsing
String
values intoDateTime
values. The usual approach is to specify the expected format usingprintf
like values (e.g.%Y-%m-%d
). I am however not sure I want to repeat that, given it's not really clear what the expected format is unless you're intimately familiar with all the format flags.Related issues
Related work
The text was updated successfully, but these errors were encountered: