Add support for showing start time in 24-hour format by joncol · Pull Request #78 · caarlos0/timer · GitHub
Skip to content

Add support for showing start time in 24-hour format#78

Merged
caarlos0 merged 1 commit into
caarlos0:mainfrom
joncol:add-twentyfour-hour-start-time-format
Sep 9, 2023
Merged

Add support for showing start time in 24-hour format#78
caarlos0 merged 1 commit into
caarlos0:mainfrom
joncol:add-twentyfour-hour-start-time-format

Conversation

@joncol

@joncol joncol commented Sep 5, 2023

Copy link
Copy Markdown
Contributor

Solves #55

Comment thread main.go Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

maybe it would be nicer to do something like:

--format 24h
--format kitchen

etc

that way we could add more formats in the future... or even allow the user to provide their own.

wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I thought about it, but was a bit reluctant to leak implementation-specific details such as "kitchen" meaning that specific format. But if you prefer it, I could modify the PR...

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yes plz

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, I'll squash the fixup commits before potential merge.

@caarlos0 caarlos0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

minor comment, other than that LGTM 🙏🏻

Comment thread main.go Outdated
Comment on lines +94 to +95
case "kitchen":
startTimeFormat = time.Kitchen

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

can be removed, handled by default

@caarlos0 caarlos0 merged commit 1661ac2 into caarlos0:main Sep 9, 2023
@caarlos0

caarlos0 commented Sep 9, 2023

Copy link
Copy Markdown
Owner

@joncol joncol deleted the add-twentyfour-hour-start-time-format branch September 11, 2023 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants