src/date_func.h
branchnoai
changeset 11044 097ea3e7ec56
parent 9723 eee46cb39750
equal deleted inserted replaced
11043:e44adcf4ed4d 11044:097ea3e7ec56
    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 */