diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-22 20:37:34 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-22 20:37:34 +0100 |
commit | a2986aad149b826e38ea8e1dc9f90426c8e12440 (patch) | |
tree | 4ddf5a92e7be3be53fb8a2a677b4fb9e562618e9 /module | |
parent | Minor cleanup. (diff) | |
download | calp-a2986aad149b826e38ea8e1dc9f90426c8e12440.tar.gz calp-a2986aad149b826e38ea8e1dc9f90426c8e12440.tar.xz |
Fix some errors in time intervals.
Diffstat (limited to 'module')
-rw-r--r-- | module/output/html.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/output/html.scm b/module/output/html.scm index 45e7df11..4ed44587 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -193,8 +193,9 @@ ;; Set start time ;; left (* 100 - (/ (datetime-difference (as-datetime (attr ev 'DTSTART)) (datetime date: start-date)) - 3600 total-length)) + (let ((dt (datetime date: start-date))) + (/ (datetime-difference (datetime-max dt (as-datetime (attr ev 'DTSTART))) dt) + 3600 total-length))) ;; Set length of event, which makes end time ;; width @@ -262,7 +263,7 @@ (define (events-between start-date end-date events) (filter-sorted-stream (lambda (e) - (timespan-overlaps? start-date end-date + (timespan-overlaps? start-date (date+ end-date (date day: 1)) (attr e 'DTSTART) (attr e 'DTEND))) events)) |