Reputation: 195
How can I get the month-ago date in Python 2.4?
In Python 2.5 it's easy:
onemonthago = datetime.date.today() + relativedelta(months = -1)
Upvotes: 3
Views: 6924
Reputation: 16443
relativedelta
is a python-dateutil function, and dateutil is python2.4 compatible, so you should be able to use the same if you have dateutil installed.
Upvotes: 3