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

Add Location as a field of YMDFlag #5

Merged
merged 12 commits into from
Aug 15, 2023
Merged

Add Location as a field of YMDFlag #5

merged 12 commits into from
Aug 15, 2023

Conversation

neomantra
Copy link
Owner

While time.Time carries time data and a time.Location, ymdflag.YMDFlag only had the yyyymmdd time data and no location. This made the interface confusing with respect to location. This commit adds a time.Location field and methods for dealing with it. Conversions to and from time.Time respect the Location.

This is breaking interface change -- but we have no version tags on this package yet.

Copy link
Collaborator

@KevM KevM left a comment

Choose a reason for hiding this comment

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

Nothing blocking. Just asking for more tests and a concern about one of the utility methods.

ymdflag.go Show resolved Hide resolved
ymdflag.go Show resolved Hide resolved
Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
neomantra and others added 8 commits August 14, 2023 11:53
Signed-off-by: Kevin Miller <kevin@neomantra.net>
…e happens

Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
@neomantra neomantra merged commit 8e5bf13 into main Aug 15, 2023
6 checks passed
KevM pushed a commit that referenced this pull request Aug 21, 2023
* Add Location as a field of YMDFlag, refactor with public helpers

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* Add examples and Taskfile

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* More interface refinement

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* Remove Location field and simplify interface, limiting where auto-date happens

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* add yyyymmdd validation tests

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* moar tests

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* Trying things out

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* Move to newer test action

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* add clarifying comment

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* fix linter issue

Signed-off-by: Kevin Miller <kevin@neomantra.net>

* More action cleanup

* task update also updates tests

---------

Signed-off-by: Kevin Miller <kevin@neomantra.net>
Co-authored-by: Kevin Miller <kevin@neomantra.net>
Signed-off-by: Kevin Miller <kevin@neomantra.net>
This pull request was closed.
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