Explorar el Código

Merge pull request #71 from yuanfeng1995/patch-1

Update htime.h
ithewei hace 4 años
padre
commit
4050071914
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      base/htime.h

+ 1 - 1
base/htime.h

@@ -10,7 +10,7 @@ BEGIN_EXTERN_C
 #define SECONDS_PER_DAY     86400   // 24*3600
 #define SECONDS_PER_WEEK    604800  // 7*24*3600
 
-#define IS_LEAP_YEAR(year) (((year)%4 == 0 && (year)%100 != 0) || (year)%100 == 0)
+#define IS_LEAP_YEAR(year) (((year)%4 == 0 && (year)%100 != 0) || (year)%400 == 0)
 
 typedef struct datetime_s {
     int year;