diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-23 01:04:37 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-23 01:04:37 +0100 |
commit | 5a17028620ed7d940eb18ce7f4f552e12214ce12 (patch) | |
tree | cff8b21f8c080a8eb8a3107ce2eec10e05085d89 /module/output | |
parent | Change style for continuing and continued long events HTML. (diff) | |
download | calp-5a17028620ed7d940eb18ce7f4f552e12214ce12.tar.gz calp-5a17028620ed7d940eb18ce7f4f552e12214ce12.tar.xz |
Hopefully fixed events-between.
Diffstat (limited to 'module/output')
-rw-r--r-- | module/output/html.scm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/module/output/html.scm b/module/output/html.scm index d6a9e8fa..50203652 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -248,13 +248,16 @@ (iota 12 0 2))))) ;; date, date, [sorted-stream events] → [list events] -;;; TODO (define (events-between start-date end-date events) - (filter-sorted-stream - (lambda (e) - (timespan-overlaps? start-date (date+ end-date (date day: 1)) - (attr e 'DTSTART) (attr e 'DTEND))) - events)) + (define (overlaps e) + (timespan-overlaps? start-date (date+ end-date (date day: 1)) + (attr e 'DTSTART) (attr e 'DTEND))) + + (stream-filter overlaps + (get-stream-interval + overlaps + (lambda (e) (not (date< end-date (as-date (attr e 'DTSTART))))) + events))) ;; Returns number of days in time interval. ;; @example |