aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-22 22:15:55 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-22 22:15:55 +0100
commitaa2a1e907843b7f3bc7984b32fd0344c9cf24a94 (patch)
treeef17a1f678fcf3da695d08c0cfd26f83d65a8f2b /module/vcomponent
parentevent-length/clapmed works marginally better. (diff)
downloadcalp-aa2a1e907843b7f3bc7984b32fd0344c9cf24a94.tar.gz
calp-aa2a1e907843b7f3bc7984b32fd0344c9cf24a94.tar.xz
Date difference once again returns dates.
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/recurrence/generate.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm
index 42b3ca09..ac1402fa 100644
--- a/module/vcomponent/recurrence/generate.scm
+++ b/module/vcomponent/recurrence/generate.scm
@@ -81,7 +81,9 @@
(change (attr e 'X-HNH-DURATION)))
(when end
(set! (attr e 'DTEND)
- (datetime+ (as-datetime start) (datetime time: change)))))))
+ (if (date? start)
+ (date+ start change)
+ (datetime+ start (datetime time: change))))))))
e))
@@ -155,7 +157,7 @@
;; The value type of dtstart and dtend must be the same
;; according to RFC 5545 3.8.2.2 (Date-Time End).
(if (date? end)
- (time second: (date-difference end (attr event 'DTSTART)))
+ (date-difference end (attr event 'DTSTART))
(time second: (datetime-difference end (attr event 'DTSTART)))))]))
(if (attr event "RRULE")
(recur-event-stream event (parse-recurrence-rule