get "yesterday's" date in iso format

Gerrit Holl gerrit at
Fri Jan 23 17:54:15 CET 2004

Tim Heaney wrote:
> necromancer_stupidspambot at writes:
> >
> > I am trying to find a simple way to get "yesterday's" date.
> Since time.time() gives the time in seconds since the epoch, you could
> just subtract a day from that to get yesterday.

Even better:

>>> from datetime import date, timedelta
>>> ( - timedelta(1)).day


179. If a "sister of a god," or a prostitute, receive a gift from her
father, and a deed in which it has been explicitly stated that she may
dispose of it as she pleases, and give her complete disposition thereof:
if then her father die, then she may leave her property to whomsoever she
pleases. Her brothers can raise no claim thereto.
          -- 1780 BC, Hammurabi, Code of Law
PrePEP: Builtin path type
Asperger's Syndrome - a personal approach:

More information about the Python-list mailing list