On Tue, Aug 11, 2015 at 07:56:00PM +0000, Suliman via Digitalmars-d-learn wrote:
[...]
> Date startDate = Date.fromISOExtString("2014-08-01");
> 
> Date currentDate =  to!(Date)(Clock.currTime()-1.days); //because current
> day is not finished
> 
>       writeln(startDate);
>       writeln(currentDate);
> 
>       Date nextday;
> 
>       while (nextday < currentDate)
>       {
>               nextday = startDate + 1.days;
                          ^^^^^^^^^
Because you're always computing from startDate, which is constant. That
should be 'nextday' instead.


>               writeln(nextday);
>       }


T

-- 
Making non-nullable pointers is just plugging one hole in a cheese grater. -- 
Walter Bright

Reply via email to