Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev



On Sat, Sep 06, 2014 at 11:42:14AM -0700, Paul Goyette wrote:
> >+            i = year / 100;
> >+            days += i * DAYS100YEARS;
> >+            year -= i * 100;
> 
> Shouldn't this one be
> 
>               days -= i * DAYS100YEARS;
> 
> ?

We are converting years to days, starting days with the number of days
to 2000-01-01 (from the epoch), decrementing "year" for years we have
handled already, summing up the result in "days".

So "year" goes down, "days" goes up.

Martin


Home | Main Index | Thread Index | Old Index