aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-07 23:56:19 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-07 23:56:19 +0200
commitf7211cbd0786fecd95cc6a0837f9192aba07cf49 (patch)
treefe45a43be8310fce72c7516354ed7064d67f020e
parentMinor notes and fixes. (diff)
downloadcalp-f7211cbd0786fecd95cc6a0837f9192aba07cf49.tar.gz
calp-f7211cbd0786fecd95cc6a0837f9192aba07cf49.tar.xz
Show EXDATES in text format.
-rw-r--r--module/output/html.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 371edba9..bd81e706 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -15,6 +15,7 @@
#:use-module (output general)
#:use-module (ice-9 curried-definitions)
#:use-module (ice-9 match)
+ #:use-module (output text)
#:use-module (git)
@@ -331,7 +332,17 @@
,((compose (@ (vcomponent recurrence display) format-recurrence-rule)
(@ (vcomponent recurrence parse) parse-recurrence-rule))
it)
- ;; TODO exdate
+ ,@(awhen (attr ev 'EXDATE)
+ (list
+ ", undantaget "
+ (add-enumeration-punctuation
+ (map (lambda (d) (if (date? d)
+ ;; TODO show year?
+ (date->string d "~e ~b")
+ ;; TODO only show time when it's different than the start time?
+ ;; or possibly only when FREQ is hourly or lower.
+ (datetime->string d "~e ~b ~k:~M")))
+ it))))
"."))
,(when (attr ev 'LAST-MODIFIED)
`(span (@ (class "last-modified")) "Senast ändrad "