summaryrefslogtreecommitdiffstats
path: root/src/calcurse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index ca55e1f..f4f0e6c 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -304,10 +304,15 @@ enum datefmt {
/* Day heading default format. */
#define DAY_HEADING_DEFAULT "%B %-d, %Y"
+/*
+ * Calcurse representation of the date of a day in the calendar.
+ * When time_t is a 32-bit signed integer, the year range is 1902 - 2037.
+ */
+#define YEAR1902_2037 (sizeof(time_t) == 4)
struct date {
- unsigned dd;
- unsigned mm;
- unsigned yyyy;
+ unsigned dd; /* day: 1 - 31 */
+ unsigned mm; /* month: 1 - 12 */
+ unsigned yyyy; /* year AD */
};
#define ISLEAP(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)