From ae47899079a448b2d71101d4b21c8e9409d82e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 23 Mar 2020 00:34:28 +0100 Subject: Remove deprecated get-time. --- module/output/html.scm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'module/output/html.scm') 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))))])) -- cgit v1.2.3