summaryrefslogtreecommitdiff
path: root/src/date_type.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/date_type.h')
-rw-r--r--src/date_type.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/date_type.h b/src/date_type.h
index d9229419a..9817e1e2f 100644
--- a/src/date_type.h
+++ b/src/date_type.h
@@ -50,12 +50,13 @@ enum {
* be encoded in a single 32 bits date, about 2^31 / 366 years. */
#define MAX_YEAR 5000000
-typedef int32 Date;
-typedef uint16 DateFract;
+typedef int32 Date; ///< The type to store our dates in
+typedef uint16 DateFract; ///< The fraction of a date we're in, i.e. the number of ticks since the last date changeover
+typedef int32 Ticks; ///< The type to store ticks in
-typedef int32 Year;
-typedef uint8 Month;
-typedef uint8 Day;
+typedef int32 Year; ///< Type for the year, note: 0 based, i.e. starts at the year 0.
+typedef uint8 Month; ///< Type for the month, note: 0 based, i.e. 0 = January, 11 = December.
+typedef uint8 Day; ///< Type for the day of the month, note: 1 based, first day of a month is 1.
/**
* Data structure to convert between Date and triplet (year, month, and day).
@@ -67,7 +68,8 @@ struct YearMonthDay {
Day day; ///< Day (1..31)
};
-static const Year INVALID_YEAR = -1;
-static const Date INVALID_DATE = -1;
+static const Year INVALID_YEAR = -1; ///< Representation of an invalid year
+static const Date INVALID_DATE = -1; ///< Representation of an invalid date
+static const Ticks INVALID_TICKS = -1; ///< Representation of an invalid number of ticks
#endif /* DATE_TYPE_H */