aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-22 20:40:17 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-22 20:40:17 +0100
commit0d4e01cf35dae7123025dc741fd201c40c9b6cd1 (patch)
tree4f9340d8ccafa09502c688a0110b943bbe3a2fdb /module/vcomponent
parentFix some errors in time intervals. (diff)
downloadcalp-0d4e01cf35dae7123025dc741fd201c40c9b6cd1.tar.gz
calp-0d4e01cf35dae7123025dc741fd201c40c9b6cd1.tar.xz
event-length/clapmed works marginally better.
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/datetime.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/vcomponent/datetime.scm b/module/vcomponent/datetime.scm
index 496a6a8c..4db9dbf1 100644
--- a/module/vcomponent/datetime.scm
+++ b/module/vcomponent/datetime.scm
@@ -55,7 +55,7 @@ Event must have the DTSTART and DTEND attribute set."
(as-datetime (attr e 'DTSTART)))))
(define-public (event-length/clamped start-date end-date e)
- (datetime-difference (datetime-min (datetime date: end-date) (as-datetime (attr e 'DTEND)))
+ (datetime-difference (datetime-min (datetime date: (date+ end-date (date day: 1))) (as-datetime (attr e 'DTEND)))
(datetime-max (datetime date: start-date) (as-datetime (attr e 'DTSTART)))))
;; Returns the length of the part of @var{e} which is within the day