path: root/src/calcurse.h
diff options
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-12-27 12:08:25 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-05-22 01:56:59 -0400
commit0bb4a59b5fb089062f0eb369d39289ff1ccfc2ba (patch)
tree7186551e8e2be5ad5643c4e5d7e57ce98037e80b /src/calcurse.h
parent4284ca91bc0fd04851a34c67dae1068f3c1defc9 (diff)
Add week numbers in the calendar and full first and last week
Much in the calendar is based on the selected day, struct date slctd_day, in ui-calendar.c. On the screen it is highlighted with a deviating colour. The highlight effect has been changed to a pair of red square brackets that do not obscure the day colour. The week number (in the frame) used to be that of the selected day, but has no obvious relation to the days in the APP panel. It has been replaced by the year day number of the selected day. The week numbers of all visible weeks are displayed to the left of the calendar. Dates are displayed also for the overlapping parts of the first and last week of the month (which do not belong to the month). Days are accessible in the appointments panel as well as in the calendar. Hence, validation of days (= inside UNIX time limits) must be extended from the calendar (in ui_calendar_move()) to include loaded days (in day_store_items()). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
1 files changed, 1 insertions, 2 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index e4cfe79..afe4430 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -145,8 +145,6 @@
#define ENDOFDAY(date) (NEXTDAY(date) - 1)
/* Calendar window. */
#define CALHEIGHT 8
@@ -1176,6 +1174,7 @@ int get_item_min(time_t);
struct tm date2tm(struct date, unsigned, unsigned);
time_t date2sec(struct date, unsigned, unsigned);
time_t utcdate2sec(struct date, unsigned, unsigned);
+int date_cmp(struct date *, struct date *);
int date_cmp_day(time_t, time_t);
char *date_sec2date_str(time_t, const char *);
void date_sec2date_fmt(time_t, const char *, char *);