Hi!
from ipython console:
In [16]: b
Out[16]: datetime.datetime(2008, 3, 1, 0, 0)
In [17]: e
Out[17]: datetime.datetime(2010, 5, 2, 0, 0)
In [18]: rrule(MONTHLY).between(b, e, inc=True)
Out[18]:
[datetime.datetime(2009, 3, 6, 14, 42, 1),
datetime.datetime(2009, 4, 6, 14, 42, 1),
datetime.datetime(2009, 5, 6, 14, 42, 1),
datetime.datetime(2009, 6, 6, 14, 42, 1),
datetime.datetime(2009, 7, 6, 14, 42, 1),
datetime.datetime(2009, 8, 6, 14, 42, 1),
datetime.datetime(2009, 9, 6, 14, 42, 1),
datetime.datetime(2009, 10, 6, 14, 42, 1),
datetime.datetime(2009, 11, 6, 14, 42, 1),
datetime.datetime(2009, 12, 6, 14, 42, 1),
datetime.datetime(2010, 1, 6, 14, 42, 1),
datetime.datetime(2010, 2, 6, 14, 42, 1),
datetime.datetime(2010, 3, 6, 14, 42, 1),
datetime.datetime(2010, 4, 6, 14, 42, 1)]
How to make between()
return dates starting from the begining (b
) date?
regards
chriss