fix leap year calculation
This commit is contained in:
parent
6a9796d7d6
commit
bd182639a3
@ -63,7 +63,8 @@
|
||||
#define SECDAY ((unsigned)(24*SECHOUR)) /* seconds per day */
|
||||
#define SECYR ((unsigned)(365*SECDAY)) /* seconds per common year */
|
||||
|
||||
#define LEAPYEAR(year) (((year) % 4) == 0)
|
||||
#define LEAPYEAR(y) \
|
||||
(((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
|
||||
|
||||
device_t clockdev;
|
||||
int clockinitted;
|
||||
|
Loading…
x
Reference in New Issue
Block a user