Function: icalendar-recur-subintervals-to-dates
icalendar-recur-subintervals-to-dates is a byte-compiled function
defined in icalendar-recur.el.gz.
Signature
(icalendar-recur-subintervals-to-dates SUBINTERVALS)
Documentation
Transform SUBINTERVALS into a list of icalendar-date recurrences.
The returned list of recurrences contains one date value for each day of each subinterval.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar-recur.el.gz
(defun icr:subintervals-to-dates (subintervals)
"Transform SUBINTERVALS into a list of `icalendar-date' recurrences.
The returned list of recurrences contains one date value for each
day of each subinterval."
(let (recurrences)
(dolist (int subintervals)
(let* ((start (icr:interval-low int))
(start-abs (calendar-absolute-from-gregorian
(ical:date-time-to-date start)))
(end (icr:interval-high int))
(end-abs (calendar-absolute-from-gregorian
(ical:date-time-to-date end)))
;; end is an exclusive upper bound, but number-sequence
;; needs an *inclusive* upper bound, so if end is at
;; midnight, the bound is the previous day:
(bound (if (zerop (+ (decoded-time-hour end)
(decoded-time-minute end)
(decoded-time-second end)))
(1- end-abs)
end-abs)))
(setq recurrences
(nconc recurrences
(mapcar #'calendar-gregorian-from-absolute
(number-sequence start-abs bound))))))
recurrences))