aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-10 23:30:19 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-10 23:30:19 +0200
commita0eee37db451abb312d87c6ffd5b4ab52fa947fe (patch)
tree8d63f324cf871e040df313b3d594f05f8b470606 /module/vcomponent
parentCleanup in run-tests. (diff)
downloadcalp-a0eee37db451abb312d87c6ffd5b4ab52fa947fe.tar.gz
calp-a0eee37db451abb312d87c6ffd5b4ab52fa947fe.tar.xz
Move if in recurrence generate to better place.
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/recurrence/generate.scm26
1 files changed, 13 insertions, 13 deletions
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm
index 8719b18e..aba0256a 100644
--- a/module/vcomponent/recurrence/generate.scm
+++ b/module/vcomponent/recurrence/generate.scm
@@ -345,19 +345,19 @@
(define rrule (prop event 'RRULE))
;; 3.8.5.1 exdate are evaluated AFTER rrule (and rdate)
- (let ((date-stream (stream-remove
- (aif (prop* event 'EXDATE)
- (cut member <> (map value it))
- (const #f))
- (if rrule
- (generate-posibilities rrule (prop event 'DTSTART))
- stream-null)
- ;; TODO ideally I should merge the limited recurrence set
- ;; with the list of rdates here. However, I have never
- ;; sen an event with an RDATE property, so I wont worry
- ;; about it for now.
- ;; (stream-merge (list->stream (#|rdate's|#))
- )))
+ (let* ((strm (if rrule
+ (generate-posibilities rrule (prop event 'DTSTART))
+ stream-null))
+ (date-stream
+ (cond ((prop* event 'EXDATE)
+ => (lambda (ex) (stream-remove (cut member <> (map value ex)) strm)))
+ (else strm))
+ ;; TODO ideally I should merge the limited recurrence set
+ ;; with the list of rdates here. However, I have never
+ ;; sen an event with an RDATE property, so I wont worry
+ ;; about it for now.
+ ;; (stream-merge (list->stream (#|rdate's|#))
+ ))
;; TODO count and until shoud be applied to the RRULE events,
;; but not the RDATE events ???
;; (TODO test against some other calendar program)