src/date_func.h
changeset 9570 8b9c1cbb0077
parent 8140 0d0d8c94f84b
equal deleted inserted replaced
9569:7697ab949b12 9570:8b9c1cbb0077
    14 
    14 
    15 void SetDate(Date date);
    15 void SetDate(Date date);
    16 void ConvertDateToYMD(Date date, YearMonthDay *ymd);
    16 void ConvertDateToYMD(Date date, YearMonthDay *ymd);
    17 Date ConvertYMDToDate(Year year, Month month, Day day);
    17 Date ConvertYMDToDate(Year year, Month month, Day day);
    18 
    18 
       
    19 static inline bool IsLeapYear(Year yr)
       
    20 {
       
    21 	return yr % 4 == 0 && (yr % 100 != 0 || yr % 400 == 0);
       
    22 }
       
    23 
    19 #endif /* DATE_FUNC_H */
    24 #endif /* DATE_FUNC_H */