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

feat: Support for times without leading '0' #251

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

aVolpe
Copy link
Contributor

@aVolpe aVolpe commented Dec 5, 2023

The web interface of clockify supports times in format HMM (1 digit for the hour and 2 digits for the minutes), for example 915 is 09:15.

I am not very familiar with go, but I added a test (following another test in this repo) to make sure everything works.

To check the new test usego test -v pkg/timehlp/time_test.go.

The parser now also supports the format H:MM also is supported by the web interface, to keep the names short the suffix 'WL' was used (without leading 0, suggestions welcome!).

The web interface of clockify supports times in format HMM (1 digit for
the hour and 2 digits for the minutes), for example 915 is 09:15.
@aVolpe aVolpe force-pushed the feat/more_time_formats branch from de40480 to 3c7b94d Compare December 5, 2023 20:56
Copy link
Owner

@lucassabreu lucassabreu left a comment

Choose a reason for hiding this comment

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

the code looks right @aVolpe , just run go fmt pkg/timehlp/time.go pkg/timehlp/time_test.go to fix some linting issues.

@aVolpe
Copy link
Contributor Author

aVolpe commented Dec 6, 2023

thanks @lucassabreu , nothing was changed nor reported by that command:

image

(The first version of this pr has some lint errors that were reported by DeepSource, but those were fixed in a force push).

@lucassabreu
Copy link
Owner

i guess i saw it before the force-push.

@lucassabreu lucassabreu merged commit d97d009 into lucassabreu:main Dec 6, 2023
7 checks passed
@lucassabreu
Copy link
Owner

thank you for the contribution, is at the release v0.46.0 now

@aVolpe
Copy link
Contributor Author

aVolpe commented Dec 6, 2023

thank you for the contribution, is at the release v0.46.0 now

I downloaded the version through homebrew and everything works! Thanks for the CLI!

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.

2 participants