date_func.h

Go to the documentation of this file.
00001 /* $Id: date_func.h 13594 2008-06-20 21:14:10Z frosch $ */
00002 
00005 #ifndef DATE_FUNC_H
00006 #define DATE_FUNC_H
00007 
00008 #include "date_type.h"
00009 
00010 extern Year      _cur_year;
00011 extern Month     _cur_month;
00012 extern Date      _date;
00013 extern DateFract _date_fract;
00014 
00015 void SetDate(Date date);
00016 void ConvertDateToYMD(Date date, YearMonthDay *ymd);
00017 Date ConvertYMDToDate(Year year, Month month, Day day);
00018 
00019 static inline bool IsLeapYear(Year yr)
00020 {
00021   return yr % 4 == 0 && (yr % 100 != 0 || yr % 400 == 0);
00022 }
00023 
00024 #endif /* DATE_FUNC_H */

Generated on Fri Jul 31 22:33:14 2009 for OpenTTD by  doxygen 1.5.6