aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/output.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-01-30 22:51:45 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-01-30 22:51:45 +0100
commitf852c30bcef530d18a474ab6ab8350a3ef93d563 (patch)
tree00fc29a6ff1a8c842d0a526f04d4124977dd6e46 /module/vcomponent/output.scm
parentUpdate recurrence generate to new date obj. (diff)
downloadcalp-f852c30bcef530d18a474ab6ab8350a3ef93d563.tar.gz
calp-f852c30bcef530d18a474ab6ab8350a3ef93d563.tar.xz
Once again compiles.
Diffstat (limited to 'module/vcomponent/output.scm')
-rw-r--r--module/vcomponent/output.scm15
1 files changed, 11 insertions, 4 deletions
diff --git a/module/vcomponent/output.scm b/module/vcomponent/output.scm
index 14c1bf13..55cc0b12 100644
--- a/module/vcomponent/output.scm
+++ b/module/vcomponent/output.scm
@@ -3,7 +3,8 @@
#:use-module (vcomponent control)
#:use-module (util)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-19 util)
+ #:use-module (srfi srfi-19 alt)
+ #:use-module (srfi srfi-19 alt util)
#:use-module (srfi srfi-26)
#:use-module (ice-9 format)
#:export (print-vcomponent
@@ -66,9 +67,15 @@ Removes the X-HNH-FILENAME attribute, and sets PRODID to
(string->ics-safe-string
(case key
((DTSTART DTEND)
- (if (string? value)
- value
- (time->string value "~Y~m~dT~H~M~S")))
+ (cond [(string? value) value]
+ [(date? value) (date->string value "~H~M~S")]
+ [(datetime? value)
+ (string-append
+ (date->string (get-date value) "~Y~m~d")
+ "T"
+ (time->string (get-time value) "~H~M~S"))]))
+ ((X-HNH-DURATION)
+ (format #f "~s" value))
(else value)))))
;; Catch