Occurrences are calculated from DTSTART and RRULE. If there is no RRULE, the component occurs only once, at the start time.
Limitations:
Only a single RRULE: is currently supported, this is the most common case.
The times this components occurs. If a block is not provided, returns an enumerator.
Occurrences may be infinite, dountil can be provided to limit the iterations, see Rrule#each.
# File lib/vpim/property/recurrence.rb, line 37 def occurrences(dountil = nil, &block) #:yield: occurrence time rr = rrule unless block_given? return Enumerable::Enumerator.new(self, :occurrences, dountil) end rr.each(dountil, &block) end
True if this components occurs in a time period later than t0, but earlier than t1.
# File lib/vpim/property/recurrence.rb, line 50 def occurs_in?(t0, t1) # TODO - deprecate this, its a hack occurrences(t1).detect do |tend| if respond_to? :duration tend += duration || 0 end tend >= t0 end end
Generated with the Darkfish Rdoc Generator 2.