-
Notifications
You must be signed in to change notification settings - Fork 539
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/sub Days #784
add/sub Days #784
Conversation
e5d5e64
to
916a32f
Compare
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.
LGTM with two style suggestions.
916a32f
to
3caf9f6
Compare
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.
One more minor nit I missed the first time around.
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 great!
docs fixes improve checked impls
5f78873
to
5721f2b
Compare
Having thought about this a bit, I think I need to add some tests before this gets merged 😄 |
I've reused the tests from |
@djc - what is the best way to get these commits into main as well - should we periodically PR |
Yes, I think so. |
This matches the work done by @avantgardnerio and @djc with the
Months
datatype but for calendarDays
.This should resolve #339 and #290 and is relevant to the clarification in #100.
Potential future work could:
days
andweeks
helper functions onDuration
as they are somewhat misleading, directing users to useDays
insteadsucc
andpred
onNaiveDate
- although sometimes it's nice to have multiple ways to do somethingAdd<Duration>
andSub<Duration>
impls forNaiveDate
This is a bit light on documentation as I'm not sure whether this is wanted or not. If the idea here is looking good, I'll add more docs.