Expand RFC-2445 (iCalendar) recurrence rule?
Roy Smith
roy at panix.com
Tue May 8 10:12:04 EDT 2012
O.B. Murithi suggested I look at http://labix.org/python-dateutil, which turns out to have exactly what I'm looking for. Thanks!
from dateutil.rrule import rrulestr
from dateutil.parser import parse
rule = rrulestr("FREQ=WEEKLY;COUNT=6;INTERVAL=2;BYDAY=FR",
dtstart=parse("2012-06-15"))
for date in rule:
print date
./rrule.py
2012-06-15 00:00:00
2012-06-29 00:00:00
2012-07-13 00:00:00
2012-07-27 00:00:00
2012-08-10 00:00:00
2012-08-24 00:00:00
More information about the Python-list
mailing list