(svn r13594) -Feature(ette)[FS#2093]: Supply newgrfs with 'day of month', 'leap year' and 'day of year'.

This commit is contained in:
frosch
2008-06-20 21:14:10 +00:00
parent 3d56c07440
commit aadd3b29af
4 changed files with 13 additions and 9 deletions

View File

@@ -16,4 +16,9 @@ void SetDate(Date date);
void ConvertDateToYMD(Date date, YearMonthDay *ymd);
Date ConvertYMDToDate(Year year, Month month, Day day);
static inline bool IsLeapYear(Year yr)
{
return yr % 4 == 0 && (yr % 100 != 0 || yr % 400 == 0);
}
#endif /* DATE_FUNC_H */