Procházet zdrojové kódy

Update htime.h

闰年判断宏逻辑修复
yuanfeng1897 před 4 roky
rodič
revize
16f5f401d2
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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;