python thirty days ago

These tiny things make Python fun and useful:

import datetime
thirty_days = datetime.timedelta(days=30)
thirty_days_ago = datetime.date.today() - thirty_days

Comments are closed.