jiffy
jiffy copied to clipboard
add quarter-year and half-year support
What does this PR do?
Adds quarter-year and half-year support to Jiffy. Added docs. Also added unit tests to cover these new units. Pun intended.
This solves https://github.com/jama5262/jiffy/issues/123
Although I didn't have to modify any code related to monthly and yearly difference calculations, two unit tests kept failing with a margin of ~0.0005. These tests fail even if I pull your unmodified version of develop and try running the tests on my machine. Maybe a newer version of Dart handles floats slightly differently? I updated these two tests since the difference was so marginal.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (a fix or feature that would cause existing functionality to change)
Checklist
- [x] Directed the PR to
develop
branch and not themaster
branch - [x] Wrote additional tests, if needed
- [x] All tests have passed
- [x] I have updated the documentation accordingly, if needed.
Fixed the formatting and pushed. Please run the CI again.
@jama5262 interestingly the unit tests on this CI seem to yield slightly different results when compared to running them on my own Windows machine.
Expected: <-0.15033557046979865>
Actual: <-0.15053763440860216>
This actually passed on my computer.
Is this normal? Should I just push a commit with the "CI values" to let this test pass?
There is a new major version of Jiffy that has been released with major changes, please feel free to open another PR with the changes you desire to be added to Jiffy, closing this PR for now