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

Added a command line option to output a single hour #16

Merged
merged 9 commits into from May 16, 2021
Merged

Added a command line option to output a single hour #16

merged 9 commits into from May 16, 2021

Conversation

Badboy-16
Copy link
Contributor

I tried to fix #3

I added the -s (--single) option to the command line input and enabled the programme to output a single hour.

Usage:
Output a single hour for current time.

$ timezone-converter hong_kong tokyo -s now
$ timezone-converter hong_kong tokyo --single now

Output a given hour specified by the user (e.g. 16).

$ timezone-converter hong_kong tokyo -s 16
$ timezone-converter hong_kong tokyo --single 16

timezone_converter/main.py Outdated Show resolved Hide resolved
timezone_converter/main.py Outdated Show resolved Hide resolved
timezone_converter/comparison_view.py Outdated Show resolved Hide resolved
timezone_converter/comparison_view.py Outdated Show resolved Hide resolved
timezone_converter/comparison_view.py Show resolved Hide resolved
timezone_converter/comparison_view.py Outdated Show resolved Hide resolved
@ibLeDy ibLeDy added the enhancement New feature or request label May 15, 2021
@ibLeDy ibLeDy added this to the v1.0.0 milestone May 15, 2021
@ibLeDy ibLeDy added this to Review in progress in Timezone Converter May 15, 2021
@Badboy-16
Copy link
Contributor Author

Just pushed some commits based on your comments above. I think it's definitely a good idea to use a default value that can be changed later just like in #15 . Thanks for the reminder to utilise it again! 👍🏼

I tested the output with the single hour option and it looks working fine.

@ibLeDy
Copy link
Owner

ibLeDy commented May 16, 2021

pre-commit.ci run

@ibLeDy
Copy link
Owner

ibLeDy commented May 16, 2021

We will have to wait a bit for pre-commit to run, because seems like GitHub is having issues:

Screenshot from 2021-05-16 16-12-35

@ibLeDy
Copy link
Owner

ibLeDy commented May 16, 2021

pre-commit.ci run

@ibLeDy
Copy link
Owner

ibLeDy commented May 16, 2021

pre-commit.ci autofix

@ibLeDy
Copy link
Owner

ibLeDy commented May 16, 2021

This looks good, I will create a release in a bit, thanks!

@ibLeDy ibLeDy merged commit 2444a85 into ibLeDy:main May 16, 2021
Timezone Converter automation moved this from Review in progress to Done May 16, 2021
@Badboy-16 Badboy-16 deleted the 3 branch May 17, 2021 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Output a single hour
2 participants