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

Allow tranforming LocalTime to time.Duration #969

Closed
wants to merge 1 commit into from

Conversation

Benbebop
Copy link

Adds a function to transform LocalTime to time.Duration and does it automatically during unmarshalling.

benchstat.txt

@pelletier
Copy link
Owner

Hi! Sorry for the delay.

Thank you for the PR! Similarly to #967 (comment), I don't think duration support should be added to the library itself, but rather on a higher-level library. Also here it changes the meaning of local time to duration. Since LocalTime.AsDuration only uses public fields, so it can be implemented outside of the library.

@Benbebop Benbebop closed this Oct 19, 2024
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