aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/recurrence/generate.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-06-13 16:10:23 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-06-13 16:10:23 +0200
commitec6d16cffb6511ad06a5cd0ff40826e36cf3f523 (patch)
tree8c1c8729ddd19638ba538c45ca8554725110f9d1 /module/vcomponent/recurrence/generate.scm
parentAll recurrence test except SETPOS now pass. (diff)
downloadcalp-ec6d16cffb6511ad06a5cd0ff40826e36cf3f523.tar.gz
calp-ec6d16cffb6511ad06a5cd0ff40826e36cf3f523.tar.xz
Fix normalization in (datetime util).
Diffstat (limited to '')
-rw-r--r--module/vcomponent/recurrence/generate.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm
index 5a4ef80b..53de1726 100644
--- a/module/vcomponent/recurrence/generate.scm
+++ b/module/vcomponent/recurrence/generate.scm
@@ -152,7 +152,7 @@
(concatenate
(map (lambda (wday)
(all-wday-in-month
- wday (set (month d) value)))
+ wday (start-of-month (set (month d) value))))
(map cdr (byday rrule)))))
;; else
@@ -168,9 +168,7 @@
7))))]
[(MONTHLY)
- ;; TODO should there be a (start-of-month d)
- ;; istead of juts d
- (let* ((instances (all-wday-in-month value d)))
+ (let* ((instances (all-wday-in-month value (start-of-month d))))
(catch 'out-of-range
(lambda ()
(cond [(eqv? #f offset)
@@ -312,11 +310,11 @@
(limiters->predicate (all-limiters rrule))
date-stream)))
-(define-stream (generate-posibilities rrule base-date)
+(define-stream (generate-posibilities rrule start-date)
(limit-recurrence-set
rrule
(extend-recurrence-set
- rrule base-date)))
+ rrule start-date)))
(define-stream (rrule-instances event)
(define rrule (attr event 'RRULE))