date_type.h
Go to the documentation of this file.00001
00002
00005 #ifndef DATE_TYPE_H
00006 #define DATE_TYPE_H
00007
00014 #define DAY_TICKS 74
00015
00016
00017
00018
00019
00020
00021
00022
00024 #define ORIGINAL_BASE_YEAR 1920
00025
00026 #define ORIGINAL_END_YEAR 2051
00027
00028 #define ORIGINAL_MAX_YEAR 2090
00029
00034 #define DAYS_TILL_ORIGINAL_BASE_YEAR (365 * ORIGINAL_BASE_YEAR + ORIGINAL_BASE_YEAR / 4 - ORIGINAL_BASE_YEAR / 100 + ORIGINAL_BASE_YEAR / 400)
00035
00036
00037 #define MIN_YEAR 0
00038
00039
00040 #define MAX_YEAR 5000000
00041
00042 typedef int32 Date;
00043 typedef uint16 DateFract;
00044
00045 typedef int32 Year;
00046 typedef uint8 Month;
00047 typedef uint8 Day;
00048
00053 struct YearMonthDay {
00054 Year year;
00055 Month month;
00056 Day day;
00057 };
00058
00059 static const Year INVALID_YEAR = -1;
00060 static const Date INVALID_DATE = -1;
00061
00062 #endif