OpenChronos icon indicating copy to clipboard operation
OpenChronos copied to clipboard

Could it be possible that the skew formula might be wrong?

Open catalinus opened this issue 14 years ago • 0 comments

Could it be possible that the skew formula might be wrong? More precisely if BASE_YEAR is 2001 then (pdate->year - BASE_YEAR)/4 does not kick in leap years but 1 year after, so it should be something like:

define BASE_YEAR 2001

u8 skew; skew = (pdate->year - BASE_YEAR)+(pdate->year - BASE_YEAR + 1)/4;

(easy test - set date to January 1st 2012, it should be SUN and not SAT).

catalinus avatar Jun 24 '11 11:06 catalinus