summaryrefslogtreecommitdiff
path: root/src/ui-calendar.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-02-25 21:31:16 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-02-26 09:14:40 +0100
commitf5d8b5e021a62bf3e36e18aa9aebee331fece8dd (patch)
tree959b101037e40ee4b7f5fa6392fceb416b666e42 /src/ui-calendar.c
parentc34f9aba29b965bf1da7e16da91ebf94ae123e89 (diff)
downloadcalcurse-f5d8b5e021a62bf3e36e18aa9aebee331fece8dd.zip
Support durations in recurrence ending dates
When spending the end date of recurring items, allow date duration specifiers such as "+5d" or "+3w2d". Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/ui-calendar.c')
-rw-r--r--src/ui-calendar.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/ui-calendar.c b/src/ui-calendar.c
index 49ccdce..4f61376 100644
--- a/src/ui-calendar.c
+++ b/src/ui-calendar.c
@@ -256,26 +256,6 @@ static long ymd_to_scalar(unsigned year, unsigned month, unsigned day)
return scalar;
}
-/*
- * Used to change date by adding a certain amount of days or weeks.
- * Returns 0 on success, 1 otherwise.
- */
-static int date_change(struct tm *date, int delta_month, int delta_day)
-{
- struct tm t;
-
- t = *date;
- t.tm_mon += delta_month;
- t.tm_mday += delta_day;
-
- if (mktime(&t) == -1) {
- return 1;
- } else {
- *date = t;
- return 0;
- }
-}
-
void ui_calendar_monthly_view_cache_set_invalid(void)
{
monthly_view_cache_valid = 0;