src/date.cpp
changeset 9570 8b9c1cbb0077
parent 9428 1ba05b499957
child 9898 75347c78b276
equal deleted inserted replaced
9569:7697ab949b12 9570:8b9c1cbb0077
    75 	ACCUM_JAN, ACCUM_FEB, ACCUM_MAR, ACCUM_APR,
    75 	ACCUM_JAN, ACCUM_FEB, ACCUM_MAR, ACCUM_APR,
    76 	ACCUM_MAY, ACCUM_JUN, ACCUM_JUL, ACCUM_AUG,
    76 	ACCUM_MAY, ACCUM_JUN, ACCUM_JUL, ACCUM_AUG,
    77 	ACCUM_SEP, ACCUM_OCT, ACCUM_NOV, ACCUM_DEC,
    77 	ACCUM_SEP, ACCUM_OCT, ACCUM_NOV, ACCUM_DEC,
    78 };
    78 };
    79 
    79 
    80 static inline bool IsLeapYear(Year yr)
       
    81 {
       
    82 	return yr % 4 == 0 && (yr % 100 != 0 || yr % 400 == 0);
       
    83 }
       
    84 
       
    85 /**
    80 /**
    86  * Converts a Date to a Year, Month & Day.
    81  * Converts a Date to a Year, Month & Day.
    87  * @param date the date to convert from
    82  * @param date the date to convert from
    88  * @param ymd  the year, month and day to write to
    83  * @param ymd  the year, month and day to write to
    89  */
    84  */