Class Vpim::Rrule
In: lib/vpim/rrule.rb
Parent: Object

Implements the iCalendar recurrence rule syntax. See etc/rrule.txt for the syntax description and examples from RFC 2445. The description is pretty hard to understand, but the examples are more helpful.

The implementation is reasonably complete, but still lacks support for:

Recurrence by date (RDATE) and exclusions (EXDATE, EXRULE).

TODO - BYWEEKNO: rules that are limited to particular weeks in a year.

TODO - BYHOUR, BYMINUTE, BYSECOND: trivial to do, but I don‘t have an immediate need for them.

TODO - new API? -> Rrule#infinite?

Examples

  • rrule.txt: utility for printing recurrence rules

Methods

each   each_until   new  

Included Modules

Enumerable

Classes and Modules

Class Vpim::Rrule::Maker

Public Class methods

The recurrence rule, rrule, specifies how to generate a set of times from a start time, dtstart (which must the first of the set of recurring times). If rrule is nil, the set contains only dtstart.

Public Instance methods

Yields for each ytime in the recurring set of events.

Warning: the set may be infinite! If you need an upper bound on the number of occurrences, you need to implement a count, or pass a time, dountil, which will not be iterated past (i.e. all times yielded will be less than dountil).

Also, iteration will not currently continue past the limit of a Time object, which is some time in 2037 with the 32-bit time_t common on most systems.

Return an Enumerable, it‘s each() will yield over all occurrences up to (and not including) time dountil.

[Validate]