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

Treat years as having 365 days, not 360 #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jacobchrismarsh
Copy link

This addresses the issue I raised in #4, switching the year calculation from 12 * 30 to 365

Along the way I also refactored a bit of the subsecond nanosecond parsing by using the built in functions rather than doing our own math.

Unit tests now show the correct result

MOZGIII added a commit to MOZGIII/fancier-duration that referenced this pull request Aug 31, 2024
* Treat years as having 365 days, not 360

* Add new test

---------

Co-authored-by: Jacob Christopher Marshall <jacobcmarshall@meta.com>
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.

1 participant