From 89b7ce2876d2ad818b284ae2204f62c61538b4d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 10 Dec 2021 03:12:36 +0100 Subject: Change {start,end}-date to pre-start and post-end. pre-start and post-end are the real intervals for a given page, since some more days than requested are often shown to make sense of a given layout. --- module/calp/html/view/calendar.scm | 6 +++--- module/calp/html/view/calendar/month.scm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm index d08210bc..129f51a9 100644 --- a/module/calp/html/view/calendar.scm +++ b/module/calp/html/view/calendar.scm @@ -376,11 +376,11 @@ window.default_calendar='~a';" (stream-filter (lambda (ev) ((@ (vcomponent datetime) event-overlaps?) - ev start-date - (date+ end-date (date day: 1)))) + ev pre-start + (date+ post-end (date day: 1)))) (stream-take-while (lambda (ev) (date< (as-date (prop ev 'DTSTART)) - (date+ end-date (date day: 1)))) + (date+ post-end (date day: 1)))) events)))) (repeating% regular (partition repeating? flat-events)) (repeating diff --git a/module/calp/html/view/calendar/month.scm b/module/calp/html/view/calendar/month.scm index 0e29f5b2..e058a2ec 100644 --- a/module/calp/html/view/calendar/month.scm +++ b/module/calp/html/view/calendar/month.scm @@ -80,7 +80,7 @@ ;; These popups are relative the document root. ;; Can thus be placed anywhere in the DOM. ,@(for event in (stream->list - (events-between start-date end-date events)) + (events-between pre-start post-end events)) `(popup-element (@ (class "vevent") (data-uid ,(output-uid event))))) -- cgit v1.2.3