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

parse times more sensibly #44

Open
jameysharp opened this issue Jun 19, 2016 · 0 comments
Open

parse times more sensibly #44

jameysharp opened this issue Jun 19, 2016 · 0 comments

Comments

@jameysharp
Copy link

If someone says set time 3:00, they probably don't mean 3am.

I'd suggest accepting times like (\d+)(:\d\d)?\s*(am|pm)?, case insensitive. If the meridian marker (am/pm) is missing and the hour is less than, say, 8? then treat it as after noon.

If someone wants an early morning event, they can explicitly specify "AM". If they wrote "8:00" and expected it to be in the evening, they can use "8pm" to get what they wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants