Blog Archive for August 26, 2010

Yesterday in Python

August 26, 2010

Today's date in python is available as:

lToday = datetime.date.today()

To do arithmetic on this date, use timedelta:

lToday = datetime.date.today()
lYesterday = lToday - timedelta(days=1)