aboutsummaryrefslogtreecommitdiff
path: root/module/output
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-12-29 01:06:24 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-12-29 01:06:24 +0100
commit5c4b8125ed37d9a883fdb4aa4bf88e962b6da8ea (patch)
tree3591faf0f42638bbf067ce69b7043553a23856b7 /module/output
parentHandle X-HNH-ALTERNATIVES in ics output. (diff)
downloadcalp-5c4b8125ed37d9a883fdb4aa4bf88e962b6da8ea.tar.gz
calp-5c4b8125ed37d9a883fdb4aa4bf88e962b6da8ea.tar.xz
HTML day highlight now only in current month.
Diffstat (limited to 'module/output')
-rw-r--r--module/output/html.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 0682bc6e..fc4199ee 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -258,11 +258,11 @@
(iota month-start (- prev-month-len month-start)))
(map (lambda (p) `(td (@ ,@(assq-merge '((class " cur ")) (cdar p)))
,@(cdr p)))
- ;; TODO only today in current month
- (map (lambda (d) `((@ (class ,(when (= d (date-day today)) "today")))
- (a (@ (href "#" ,(date->string date "~Y-~m-")
- ,(pad0 d))
- (class "hidelink")) ,d)))
+ (map (lambda (d) `((@ (class ,(when (date=? today (set (date-day date) d))
+ "today")))
+ (a (@ (href "#" ,(date->string date "~Y-~m-")
+ ,(pad0 d))
+ (class "hidelink")) ,d)))
(iota month-len 1)))
(map (td '(class "next") (month+ date))
(iota (modulo (- (* 7 5) month-len month-start) 7) 1))))))