aboutsummaryrefslogtreecommitdiff
path: root/module/output/html.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/output/html.scm')
-rw-r--r--module/output/html.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 3b17d81b..b7e369a7 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -94,12 +94,14 @@
;; no end value, just return start
[else (date->string s)]))]
[else ; guaranteed datetime
- (let ((s (attr ev 'DTSTART))
- (e (attr ev 'DTEND)))
- (let ((fmt-str (if (date= (get-date s) (get-date e))
- "~H:~M" "~Y-~m-~d ~H:~M")))
- (values (datetime->string s fmt-str)
- (datetime->string e fmt-str))))]))
+ (let ((s (attr ev 'DTSTART)))
+ (cond [(attr ev 'DTEND)
+ => (lambda (e)
+ (let ((fmt-str (if (date= (get-date s) (get-date e))
+ "~H:~M" "~Y-~m-~d ~H:~M")))
+ (values (datetime->string s fmt-str)
+ (datetime->string e fmt-str))))]
+ [else (datetime->string s "~Y-~m-~d ~H:~M")]))]))