-
Notifications
You must be signed in to change notification settings - Fork 555
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
User-friendly date/time parsing #129
Comments
This sounds like a |
I too would like to see this, but I keep jumping around too much to learn nom well enough to do something about it. |
Sounds like something that would fit well in the humantime crate (it currently only supports parsing durations). |
This would be really useful. I've some tasks to start daily from a certain time. Currently I've much boilerplate code which breaks with every chrono release just to parse a user %H:%M which is added to the current date and then checked whether we've to wait for tomorrow or can schedule this already today. |
It would be nice if
chrono
(or another crate, really) offered more ways of parsing date and time strings that come from user input. These strings often don't fully specify aDateTime
, so I'd like to use the current date as a sort of "fallback" (imagine that the user wants to set a timer to fire today at 12:30, so they just enter "12:30" and expect it to work).Currently,
chrono
just bails when a parsed string doesn't fully specify aDateTime
.The text was updated successfully, but these errors were encountered: