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

Unify all command datetime inputs #328

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

davidag
Copy link
Contributor

@davidag davidag commented Oct 8, 2019

This PR allows things like these:

$ watson add -f 13:00 -t 14:00 project
$ watson aggregate -f 00:00
$ watson log -f 00:00
$ watson stop --at "2019-07-04 09:37:00"  # the one reported on #292

The changes are:

  • Rename DateParamType to DateTimeParamType because it now supports
    times in the following formats: 'HH:mm' and 'HH:mm:ss'.
  • Remove TimeParamType by supporting its formats in DateTimeParamType.
  • Add the new valid formats to tests (previously invalid).

Fixes #292 and improves #278

@davidag davidag force-pushed the unify-datetime-cli-input branch 2 times, most recently from a04f92b to 5517841 Compare October 16, 2019 15:44
@davidag davidag changed the title Fix #292 by unifying all command datetime inputs Unify all command datetime inputs Oct 22, 2019
@davidag davidag force-pushed the unify-datetime-cli-input branch 3 times, most recently from bdf6681 to abc29a4 Compare November 28, 2019 11:55
@davidag
Copy link
Contributor Author

davidag commented Nov 28, 2019

I have cleaned up and rebased this PR. It should be ready for reviewing @k4nar.

k4nar
k4nar previously approved these changes Nov 28, 2019
Copy link
Collaborator

@k4nar k4nar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me 👍 .

@jmaupetit
Copy link
Contributor

@davidag A last conflict to solve and we are good to go! 🙏

Fixes jazzband#292

- Rename DateParamType to DateTimeParamType because it now supports
times in the following formats: 'HH:mm' and 'HH:mm:ss'.
- Remove TimeParamType by supporting its formats in DateTimeParamType.
- Add the new valid formats to tests (previously invalid).
- Tests for the 'stop' command now support the same dates/times than the
other commands.
@davidag
Copy link
Contributor Author

davidag commented Dec 3, 2019

@jmaupetit @k4nar: conflict solved 👍

@jmaupetit jmaupetit merged commit 9b3b40d into jazzband:master Dec 3, 2019
@davidag davidag deleted the unify-datetime-cli-input branch December 3, 2019 15:49
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

Successfully merging this pull request may close these issues.

Parsing of date/time fails when using stop --at
3 participants