aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/calp/html/view/calendar.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm
index 727fd8ba..82cccdf3 100644
--- a/module/calp/html/view/calendar.scm
+++ b/module/calp/html/view/calendar.scm
@@ -355,12 +355,16 @@
(id "xcal-data"))
,((@ (vcomponent xcal output) ns-wrap)
(map (@ (vcomponent xcal output) vcomponent->sxcal)
+ ;; A simple filter-sorted-stream on event-overlaps? here fails. See tests/annoying-events.scm
(stream->list
- (filter-sorted-stream
+ (stream-filter
(lambda (ev)
((@ (vcomponent datetime) event-overlaps?)
ev start-date
(date+ end-date (date day: 1))))
- events))))))
+ (stream-take-while (lambda (ev) (date<
+ (as-date (prop ev 'DTSTART))
+ (date+ end-date (date day: 1))))
+ events)))))))
))