summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-10-05 10:48:13 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-06 12:37:06 +0200
commitd874f7ff974934aa9e8265e0deb7c03a2dab235c (patch)
treebb9e08b7be015888c7045250f7510a5c92317b16 /src
parent162c6aebddbe2d79d4b435b959d2285c1543de42 (diff)
downloadcalcurse-d874f7ff974934aa9e8265e0deb7c03a2dab235c.tar.gz
calcurse-d874f7ff974934aa9e8265e0deb7c03a2dab235c.zip
src/calcurse.h: Rework date manipulation constants
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r--src/calcurse.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 4418510..3214271 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -123,14 +123,22 @@
#define SBARMAXWIDTHPERC 50
/* Related to date manipulation. */
-#define DAYINSEC 86400
-#define HOURINSEC 3600
-#define MININSEC 60
-#define YEARINDAYS 365
#define YEARINMONTHS 12
-#define WEEKINDAYS 7
+#define YEARINDAYS 365
#define TM_YEAR_BASE 1900
+#define WEEKINDAYS 7
+#define DAYINHOURS 24
+#define HOURINMIN 60
+#define MININSEC 60
+
+#define WEEKINHOURS (WEEKINDAYS * DAYINHOURS)
+#define WEEKINMIN (WEEKINHOURS * HOURINMIN)
+#define WEEKINSEC (WEEKINMIN * MININSEC)
+#define DAYINMIN (DAYINHOURS * HOURINMIN)
+#define DAYINSEC (DAYINMIN * MININSEC)
+#define HOURINSEC (HOURINMIN * MININSEC)
+
/* Calendar window. */
#define CALHEIGHT 12