aboutsummaryrefslogtreecommitdiff
path: root/module/output/terminal.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/terminal.scm
parentRemove unused datetime->decimal-hour. (diff)
downloadcalp-ae47899079a448b2d71101d4b21c8e9409d82e34.tar.gz
calp-ae47899079a448b2d71101d4b21c8e9409d82e34.tar.xz
Remove deprecated get-time.
Diffstat (limited to 'module/output/terminal.scm')
-rw-r--r--module/output/terminal.scm18
1 files changed, 6 insertions, 12 deletions
diff --git a/module/output/terminal.scm b/module/output/terminal.scm
index 68e66eb9..cb18649d 100644
--- a/module/output/terminal.scm
+++ b/module/output/terminal.scm
@@ -41,12 +41,10 @@
(display
(string-append
(if (datetime? (attr ev 'DTSTART))
- (string-append (date->string (get-date (attr ev 'DTSTART)))
- " "
- (time->string (get-time (attr ev 'DTSTART))))
- ((@ (texinfo string-utils) center-string)
- (date->string (attr ev 'DTSTART))
- 19))
+ (datetime->string (attr ev 'DTSTART) "~Y-~m-~d ~H:~M:~S")
+ ((@ (texinfo string-utils) center-string)
+ (date->string (attr ev 'DTSTART))
+ 19))
; TODO show truncated string
" │ "
(if (= i cur-event) "\x1b[7m" "")
@@ -115,15 +113,11 @@
;; another story.
(let ((start (attr ev 'DTSTART)))
(if (datetime? start)
- (string-append (date->string (get-date start))
- " "
- (time->string (get-time start)))
+ (datetime->string (attr ev 'DTSTART) "~Y-~m-~d ~H:~M:~S")
(date->string start)))
(let ((end (attr ev 'DTEND)))
(if (datetime? end)
- (string-append (date->string (get-date end))
- " "
- (time->string (get-time end)))
+ (datetime->string (attr ev 'DTSTART) "~Y-~m-~d ~H:~M:~S")
(date->string end)))
(unlines (take-to (flow-text (or (attr ev 'DESCRIPTION) "")
#:width (min 70 width))