-
Notifications
You must be signed in to change notification settings - Fork 182
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
Iterator
s for Range
s of Date
s with day steps
#5875
base: main
Are you sure you want to change the base?
Conversation
`skip` in `DateRangeIter` used `step_by` with boundary even
Thanks for your interest! The linked issue is about date range formatting, not necessarily date increment calculations. Now, adding durations to dates is something we want, and which we have partially implemented. I would support a PR adding |
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.
Not sure about the iteration API; @Manishearth wdyt?
I don't want to add an entirely new API for this. A I do not see a large benefit of a dedicated API that lets you control the step size, especially since it only supports step sizes measured in days and no other unit. |
lol
understood
Hmm... but |
Oh, if it's unstable we should just not do this until it stabilizes. |
So, close the PR then? |
If a dedicated |
Sorry about the misleading issue! In general, if you want to make contributions, consider issues labeled good first issue, which should generally have more detail on what the goals are. |
The issue: #5448
The PR implements iterators with day steps for Date ranges by next pipeline:
RataDie
->Iso::iso_from_fixed
->Date::new_from_iso
The PR is only partial solution for the issue because:
ArithmeticDate
(at least if day step is less or equal than min possible days in a month of calendar)