From 8dd694b56956a1c4ec3519743904222b465e10a5 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Thu, 13 Dec 2018 20:29:22 +0100 Subject: Simplify day storage The function day_process_storage() is a wrapper for day_store_items(). It has an unused second argument, and is only used twice to load the selected day. It has been removed. A new function, get_slctd_day(), is the equivalant of get_today() and replaces the very awkwardly named ui_calendar_get_slctd_day_sec(). Signed-off-by: Lukas Fleischer --- src/utils.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index a194b10..fd47de6 100644 --- a/src/utils.c +++ b/src/utils.c @@ -672,6 +672,12 @@ time_t get_today(void) return date2sec(day, 0, 0); } +/* Returns the beginning of the selected day in the calendar. */ +time_t get_slctd_day(void) +{ + return date2sec(*ui_calendar_get_slctd_day(), 0, 0); +} + /* Returns the current time in seconds. */ time_t now(void) { -- cgit v1.2.3-54-g00ecf