From 88e14917882b0c3f79e942b61027882fe9a7fe87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 24 May 2020 22:31:08 +0200 Subject: Handle events with no DTEND. --- module/vcomponent/parse/component.scm | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'module/vcomponent/parse') diff --git a/module/vcomponent/parse/component.scm b/module/vcomponent/parse/component.scm index c2d297fd..ea695696 100644 --- a/module/vcomponent/parse/component.scm +++ b/module/vcomponent/parse/component.scm @@ -109,20 +109,7 @@ (loop (cdr lst) (cons (make-vcomponent (string->symbol (cadr head))) stack))] [(string=? "END" (car head)) - ;; TODO This is an ugly hack until the rest of the code is updated - ;; to work on events without an explicit DTEND attribute. (when (eq? (type (car stack)) 'VEVENT) - (when (not (attr (car stack) 'DTEND)) - (set! (attr (car stack) 'DTEND) - (let ((start (attr (car stack) 'DTSTART))) - ;; p. 54, 3.6.1 - ;; If DTSTART is a date then it's an all - ;; day event. If DTSTART instead is a - ;; datetime then the event has a length - ;; of 0? - (if (date? start) - (date+ start (date day: 1)) - (datetime+ start (datetime time: (time hour: 1))))))) ;; This isn't part of the field values since we "need" ;; the type of DTSTART for UNTIL to work. -- cgit v1.2.3