diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/datetime.scm | 2 | ||||
-rw-r--r-- | module/vcomponent/output.scm | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/module/datetime.scm b/module/datetime.scm index 9b0ccd47..a127b274 100644 --- a/module/datetime.scm +++ b/module/datetime.scm @@ -579,7 +579,7 @@ (car (mktime (datetime->tm start))))) (define-public (date-difference end start) - (date day: (/ (datetime-difference (datetime date: end) + (date day: (ceiling-quotient (datetime-difference (datetime date: end) (datetime date: start)) 86400))) diff --git a/module/vcomponent/output.scm b/module/vcomponent/output.scm index d142e922..e95574ac 100644 --- a/module/vcomponent/output.scm +++ b/module/vcomponent/output.scm @@ -10,6 +10,7 @@ #:export (print-vcomponent serialize-vcomponent)) +;;; TODO this is broken,2020-03-22 (define* (print-vcomponent comp #:optional (port #t) #:key (descend? #t) (depth 0)) (let ((kvs (map (lambda (key) (cons key (attr* comp key))) (attributes comp)))) @@ -68,13 +69,9 @@ Removes the X-HNH-FILENAME attribute, and sets PRODID to (case key ((DTSTART DTEND) (cond [(string? value) value] - [(date? value) (date->string value "~H~M~S")] + [(date? value) (date->string value "~Y~m~d")] [(datetime? value) - (string-append - (date->string (get-date value) "~Y~m~d") - "T" - (time->string (get-time value) "~H~M~S" ; ~z - ))])) + (datetime->string value)])) ((X-HNH-DURATION) (format #f "~s" value)) (else value))))) |