From f852c30bcef530d18a474ab6ab8350a3ef93d563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 30 Jan 2020 22:51:45 +0100 Subject: Once again compiles. --- module/vcomponent/output.scm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'module/vcomponent/output.scm') 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 -- cgit v1.2.3