diff options
Diffstat (limited to 'date.h')
-rw-r--r-- | date.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -24,14 +24,16 @@ * The offset in days from the '_date == 0' till * 'ConvertYMDToDate(ORIGINAL_BASE_YEAR, 0, 1)' */ -#define DAYS_TILL_ORIGINAL_BASE_YEAR 0 +#define DAYS_TILL_ORIGINAL_BASE_YEAR (365 * ORIGINAL_BASE_YEAR + ORIGINAL_BASE_YEAR / 4 - ORIGINAL_BASE_YEAR / 100 + ORIGINAL_BASE_YEAR / 400) /* Temporary value to make transition to full past 2090 easier/more clear */ -#define BASE_YEAR 1920 +#define BASE_YEAR 0 /* The absolute minimum & maximum years in OTTD */ -#define MIN_YEAR 1920 -#define MAX_YEAR 2090 +#define MIN_YEAR 0 +/* MAX_YEAR, nicely rounded value of the number of years that can + * be encoded in a single 32 bits date, about 2^31 / 366 years. */ +#define MAX_YEAR 5000000 /* Year and Date are defined elsewhere */ typedef uint8 Month; |