[Python-Dev] dateutil
Gustavo Niemeyer
niemeyer at conectiva.com
Thu Mar 11 15:21:10 EST 2004
> I'd like to try out your natural language parser, but can't find it. I
> naively thought this might work, but it doesn't:
>
> >>> import recur
> >>> import datetime
> >>> for eachDate in recur.Recurrence(datetime.date(2004, 1, 7), "every 4 days", datetime.date(2004, 4, 15)):
> ... print eachDate
>>> list(rrule(FREQ_DAILY,interval=4,count=3))
[datetime.datetime(2004, 3, 11, 17, 17, 19),
datetime.datetime(2004, 3, 15, 17, 17, 19),
datetime.datetime(2004, 3, 19, 17, 17, 19)]
[...]
> I realize this is a usage question and python-dev isn't a usage list.
> Still, it suggests that perhaps the community as a whole needs a bit
> more exposure to these concepts before they are incorporated into the
> standard library. Perhaps a PEP about recurrence relations is
> warranted.
Have you looked at the RRULE item on the iCalendar RFC? It should
tell you everything about date recurrences. If you're interested,
you might want to read it, and try out the rrule implementation.
--
Gustavo Niemeyer
http://niemeyer.net
More information about the Python-Dev
mailing list