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)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With