-
Notifications
You must be signed in to change notification settings - Fork 117
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 support for Dates.FixedPeriod
and Dates.CompoundPeriod
#331
Conversation
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
==========================================
+ Coverage 80.23% 80.69% +0.45%
==========================================
Files 15 16 +1
Lines 1174 1207 +33
==========================================
+ Hits 942 974 +32
- Misses 232 233 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
==========================================
+ Coverage 79.74% 80.76% +1.02%
==========================================
Files 15 16 +1
Lines 1180 1248 +68
==========================================
+ Hits 941 1008 +67
- Misses 239 240 +1
Continue to review full report at Codecov.
|
I now added support for
We could either leave it like that, or decide between two options to enable all arithmetic operations between
|
I now added documentation. If we are ok with the behavior described in #331 (comment), this should be good to review and merge. |
Dates.FixedPeriod
Dates.FixedPeriod
and Dates.CompoundPeriod
What's the current status of this PR? Is there more work that needs to be done before it can be merged? If some of the above issues are deal-breakers, I could take a shot at addressing them. |
If we are fine with the current behavior (see #331 (comment)), then this should be good to merge. One issue remains: since |
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
==========================================
+ Coverage 79.74% 84.55% +4.81%
==========================================
Files 15 16 +1
Lines 1180 1554 +374
==========================================
+ Hits 941 1314 +373
- Misses 239 240 +1
Continue to review full report at Codecov.
|
It seems like fixing arithmetic would be good. I would definitely be surprised to find that it doesn't work. I'm having a hard time deciding which of your solutions I like better. On one hand, it seems a little strange to say But on the other hand, converting to the units of the Does anyone else have thoughts? |
My 2 cents is that this is already a big PR, which is overdue for a review and merge. The proposed arithmetic implementation doesn't look "obviously right" to me, so it seems wiser to leave it to a future PR than to risk having to deal with a breaking change if a mistake is made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think it's better to not add more complexity here. If there are no objections, I'll merge tomorrow
mind tagging a release with this feature? |
Done, this is in |
thanks! |
This is an attempt at #125.
Things to (maybe) add:
CompoundPeriod
s (if they only containFixedPeriod
s)