On Monday, 12 March 2018 at 02:49:34 UTC, Jonathan M Davis wrote:
On Monday, March 12, 2018 02:11:49 Jordan Wilson via
Digitalmars-d-learn wrote:
[...]
Maybe iota should be made to work, but as present, it basically
wants all three of the types it's given to be the same or
implicitly convert
On Monday, March 12, 2018 02:11:49 Jordan Wilson via Digitalmars-d-learn
wrote:
> I wanted to iterate through a date range, so I initially tried:
> iota(Date(2016,1,1),Date(2018,1,1),dur!"days"(1));
>
> That wouldn't compile, which is fair enough I guess.
Maybe iota should be made to work, but as
I wanted to iterate through a date range, so I initially tried:
iota(Date(2016,1,1),Date(2018,1,1),dur!"days"(1));
That wouldn't compile, which is fair enough I guess.
So I tried a for loop:
for (auto i = Date(2016,1,1); i < Date(2018,1,1);
i+=dur!"days"(1)){}
That seemed to work fine, but I