Feature #14550
openSupport keyword arguments with Date#step
Description
How about supporting keyword arguments with Date#step like Numeric#step?
from = Date.new(2018, 1, 1)
to = Date.new(2018, 2, 1)
from.step(to: to, by: 3).to_a
I expected that this is already supported.
But not.
Files
Updated by shevegen (Robert A. Heiler) over 6 years ago
Seems ok.
For others, here is a quick link to the documentation for Date
in current ruby 2.5.0:
http://ruby-doc.org/stdlib-2.5.0/libdoc/date/rdoc/Date.html#method-i-step
Updated by ksss (Yuki Kurihara) over 6 years ago
- File date-step-2.patch date-step-2.patch added
Thank you for reviewing.
I updated the documentation for Date#step also. (date-step-2.patch)
Updated by avit (Andrew Vit) over 6 years ago
If adding keyword options, would it make sense to add the possibility to enumerate by >>
for whole months instead of only succ
days, or is that out of scope here?
Updated by duerst (Martin Dürst) over 6 years ago
avit (Andrew Vit) wrote:
If adding keyword options, would it make sense to add the possibility to enumerate by
>>
for whole months instead of onlysucc
days, or is that out of scope here?
Please write a separate feature describing your proposal in more detail. You can link to this feature if you think it's related.