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

AltStyle によって変換されたページ (->オリジナル) /