Date calculation

Yermat loic at fejoz.net
Thu Jul 22 07:26:51 EDT 2004


David Mostert wrote:
> I'm a Newbie.
> 
> Is there a method in Python to display yesterday's date?
> 
> ie: Yesterday = Today - 1day
> 

http://www.python.org/doc/2.3.4/lib/module-datetime.html

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

-- 
Yermat




More information about the Python-list mailing list