calendar (date) iterator?

Marcus magoldfish at gmail.com
Tue Mar 6 14:55:12 EST 2007


Hi,

I'm looking for useful starting points, suggestions, and sample code,
to implement a calendar iterator.  Simply, the iterator is seeded with
an initial calendar date, e.g., "03-12-2006", and then subsequent
calls to next return subsequent dates.  The seed could be a standard
calendar/datetime object.

> iter = calendarIterator("03-12-2006")
> print iter.next()

   03-12-2006

A useful extension would be to allow specifiation of iter intervals,
e.g.,

> iter = calendarIterator("03-12-2006 01:00:00", "minutes")
> print iter.next()

   03-12-2006 01:01:00

Thanks in advance for pointers and suggestions!




More information about the Python-list mailing list