aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/group.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-24 22:31:08 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-24 22:31:08 +0200
commit88e14917882b0c3f79e942b61027882fe9a7fe87 (patch)
treede6180eed71a65a50fcf55b67796b6f1b92de54c /module/vcomponent/group.scm
parentCatch warnings in tests. (diff)
downloadcalp-88e14917882b0c3f79e942b61027882fe9a7fe87.tar.gz
calp-88e14917882b0c3f79e942b61027882fe9a7fe87.tar.xz
Handle events with no DTEND.
Diffstat (limited to 'module/vcomponent/group.scm')
-rw-r--r--module/vcomponent/group.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/vcomponent/group.scm b/module/vcomponent/group.scm
index 1e5728c6..72acbce9 100644
--- a/module/vcomponent/group.scm
+++ b/module/vcomponent/group.scm
@@ -26,7 +26,11 @@
;; of tommorow, and finishes with the rest when it finds the first
;; object which begins tomorow (after midnight, exclusize).
(filter-sorted-stream*
- (lambda (e) (date/-time<? tomorow (attr e 'DTEND)))
+ (lambda (e) (date/-time<? tomorow
+ (or (attr e 'DTEND)
+ (if (date? (attr e 'DTSTART))
+ (date+ (attr e 'DTSTART) (date day: 1))
+ (attr e 'DTSTART)))))
(lambda (e) (date/-time<=? tomorow (attr e 'DTSTART)))
stream)))