aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-26 02:14:14 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-26 02:14:14 +0200
commit33210465a0a94a271686d7430db741a3c9e74a9a (patch)
treecf4064670aaec2769b0bc504ac7918414d3427b0
parentHTML event attributes added as html attributes. (diff)
downloadcalp-33210465a0a94a271686d7430db741a3c9e74a9a.tar.gz
calp-33210465a0a94a271686d7430db741a3c9e74a9a.tar.xz
Remove days-between in favour of days-in-interval.
-rw-r--r--module/output/html.scm12
1 files changed, 1 insertions, 11 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index e671087e..307c0236 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -319,16 +319,6 @@
(lambda (e) (not (date< end-date (as-date (attr e 'DTSTART)))))
events)))
-;; Returns number of days in time interval.
-;; @example
-;; (days-between #2020-01-01 #2020-01-05)
-;; ⇒ 5
-;; @end example
-;; date, date → int
-(define (days-between start-date end-date)
- ;; TODO be vary if date-difference changes again
- (1+ (day (date-difference end-date start-date))))
-
;; date, date → [list date]
(define (date-range start end)
(stream->list
@@ -342,7 +332,7 @@
(div (@ (class "days"))
,@(time-marker-div)
(div (@ (class "longevents")
- (style "grid-column-end: span " ,(days-between start-date end-date)))
+ (style "grid-column-end: span " ,(days-in-interval start-date end-date)))
"" ; prevent self-closing
,@(lay-out-long-events start-date end-date long-events))
,@(map (lambda (day-date)