1
yesterday = datetime.date.fromordinal(datetime.date.today().toordinal()-1)
more on search4fan.github.io