From 8f0549d5d37008f497a11f7ded50b35321f182a7 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Tue, 31 Jul 2018 14:10:12 +0200 Subject: [PATCH] [Timeline] Use a proper way to increase a supplied date by one day Courtesy of http://sachachua.com/blog/2015/08/org-mode-date-arithmetic/ --- site-lisp/timeline-tools.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/site-lisp/timeline-tools.el b/site-lisp/timeline-tools.el index e9b7751..0540992 100644 --- a/site-lisp/timeline-tools.el +++ b/site-lisp/timeline-tools.el @@ -378,13 +378,15 @@ interactively, START and END are queried with `org-read-date’." DATE should be a string of the form %Y-%m-%d. When called interactively, this date will be queried with `org-read-date’. -The timeline will be formatted for DATE starting at 00:00 and -ending at 23:61. When not given, FILES defaults to -`org-agenda-files’ including archives." +When not given, FILES defaults to `org-agenda-files’ including +archives." (interactive (list (org-read-date nil nil))) - (timeline-tools-format-timeline (concat date " 00:00") - (concat date " 23:61") - files)) + (let ((timeline-tools-time-format "%H:%M") + (timeline-tools-headline-time-format "%Y-%m-%d")) + (timeline-tools-format-timeline (concat date " 00:00") + (org-read-date nil nil "+1d" nil + (org-time-string-to-time date)) + files))) ;; Interactive functions