forked from PaulStoffregen/Time
2
Time.cpp
2
Time.cpp
@ -144,7 +144,7 @@ int year(time_t t) { // the year for the given time
|
||||
/* These are for interfacing with time serivces and are not normally needed in a sketch */
|
||||
|
||||
// leap year calulator expects year argument as years offset from 1970
|
||||
#define LEAP_YEAR(Y) ( ((1970+Y)>0) && !((1970+Y)%4) && ( ((1970+Y)%100) || !((1970+Y)%400) ) )
|
||||
#define LEAP_YEAR(Y) ( ((1970+(Y))>0) && !((1970+(Y))%4) && ( ((1970+(Y))%100) || !((1970+(Y))%400) ) )
|
||||
|
||||
static const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31}; // API starts months from 1, this array starts from 0
|
||||
|
||||
|
Reference in New Issue
Block a user