From d874f7ff974934aa9e8265e0deb7c03a2dab235c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 5 Oct 2011 10:48:13 +0200 Subject: src/calcurse.h: Rework date manipulation constants Signed-off-by: Lukas Fleischer --- src/calcurse.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2