aboutsummaryrefslogtreecommitdiff
path: root/module/output/html.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-23 00:34:28 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-23 00:36:21 +0100
commitae47899079a448b2d71101d4b21c8e9409d82e34 (patch)
tree73fa1ec4d618d2a66650fee59b1e377cd7b3e40a /module/output/html.scm
parentRemove unused datetime->decimal-hour. (diff)
downloadcalp-ae47899079a448b2d71101d4b21c8e9409d82e34.tar.gz
calp-ae47899079a448b2d71101d4b21c8e9409d82e34.tar.xz
Remove deprecated get-time.
Diffstat (limited to 'module/output/html.scm')
-rw-r--r--module/output/html.scm14
1 files changed, 5 insertions, 9 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 1f4b8e2f..d6a9e8fa 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -28,9 +28,7 @@
;; TODO currently not guaranteed to be unique
(define (UID ev)
(string-append
- ;; (date/-time->string (attr ev 'DTSTART) "~s")
- (date->string (as-date (attr ev 'DTSTART)) "~Y~m~d")
- (time->string (as-time (attr ev 'DTSTART)) "~H~M~S")
+ (datetime->string (as-datetime (attr ev 'DTSTART)) "~Y~m~d~H~M~S")
(html-attr (attr ev 'UID))))
;; This should only be used on time intervals, never on absolute times.
@@ -61,12 +59,10 @@
[else ; guaranteed datetime
(let ((s (attr ev 'DTSTART))
(e (attr ev 'DTEND)))
- (let ((s-str (time->string (get-time s) "~H:~M"))
- (e-str (time->string (get-time e) "~H:~M")))
- (if (date= (get-date s) (get-date e))
- (values s-str e-str)
- (values (string-append (date->string (get-date s) "~Y-~m-~d ") s-str)
- (string-append (date->string (get-date e) "~Y-~m-~d ") e-str)))))]))
+ (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))))]))