diff options
Diffstat (limited to 'module/vcomponent/recurrence')
-rw-r--r-- | module/vcomponent/recurrence/generate.scm | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm index 435d3009..a274ecfa 100644 --- a/module/vcomponent/recurrence/generate.scm +++ b/module/vcomponent/recurrence/generate.scm @@ -73,6 +73,8 @@ (date->time-utc d)) (when (attr e 'DTEND) + (format #t "file = ~a~%dtstart = ~a~%duration = ~a~%" + (attr e 'X-HNH-FILENAME) (attr e 'DTSTART) (attr e 'DURATION)) (set! (attr e 'DTEND) (add-duration (attr e 'DTSTART) (attr e 'DURATION)))) @@ -124,12 +126,21 @@ (if (not (attr event 'RRULE)) (stream event) (begin + (format #t "!!! DURATION = ~a~%" (attr event 'DURATION)) (when (and (attr event 'DTEND) (not (attr event 'DURATION))) - (set! (attr event "DURATION") - (time-difference - (attr event "DTEND") - (attr event "DTSTART")))) + (let ((dt (time-difference (attr event "DTEND") (attr event "DTSTART") ))) + (format #t "duration = ~a~%start = ~a, end = ~a~%diff = ~a~%" + (attr event "DURATION") + (attr event "DTSTART") (attr event "DTEND") + dt) + (set! (attr event "DURATION") + dt + #; + (time-difference + (attr event "DTEND") + (attr event "DTSTART"))))) + (format #t "||| DURATION = ~a~%" (attr* event "DURATION")) (if (attr event "RRULE") (recur-event-stream event (parse-recurrence-rule (attr event "RRULE"))) ;; TODO some events STANDARD and DAYLIGT doesn't have RRULE's, but rather |