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

Allow skipping the colon when parsing time #5

Open
Gelio opened this issue Oct 26, 2023 · 0 comments
Open

Allow skipping the colon when parsing time #5

Gelio opened this issue Oct 26, 2023 · 0 comments

Comments

@Gelio
Copy link
Owner

Gelio commented Oct 26, 2023

Sometimes the colon is unnecessary when resolving the time.

  • 725 -> 7:25
  • 1420 -> 14:20
  • 5 -> 5:00

Let's modify the time parser to account for these situations.

Sometimes this could lead to ambiguities:

  • Oct 2 725 -> 725-10-2 (just the date) or 2023-10-02 7:25

I believe we should only make the colon optional when the format expects a time, so:

  • after a relative date
  • after a day of the week
  • at the beginning of the query
@Gelio Gelio changed the title Allow skipping the colon in time Allow skipping the colon when parsing time Oct 26, 2023
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

1 participant