In Julia, you may generate a date range by month like this:
julia> dr = Date(2014,1,29):Dates.Month(1):Date(2014,07,29)
Date("2014-01-29"):Month(1):Date("2014-07-29")
julia> collect(dr)
7-element Array{Date,1}:
2014-01-29
2014-02-28
2014-03-29
2014-04-29
2014-05-29
2014-06-29
2014-07-29
Date(2014,1,29) is the start date, Dates.Month(1) is the step, Date(2014,07,29) is the end date.
Raku has a method later, but when used in custom generator, it lead to infinite range:
lazy my @dates = Date.new('2014-01-29'), Date.new('2014-02-28'), { $^a.later(:1month) } ... Date.new('2014-07-29')
If I use * >= Date.new('2014-07-29') instead of Date.new('2014-07-29') on the right of ... operator, it works:
lazy my @a = Date.new('2014-01-29'), Date.new('2014-02-28'), { $^a.later(:1month) } ... * >= Date.new('2014-07-29')
2014-01-29
2014-02-28
2014-03-28
2014-04-28
2014-05-28
2014-06-28
2014-07-28
2014-08-28
why the custom generator { $^a.later(:1month) } in the { $^a.later(:1month) } ... Date.new('2014-07-29') doesn't stop at 2014-07-29 and lead to infinite range?