A problem with Time

Dick Moores rdm at rcblue.com
Sun Aug 19 23:56:25 CEST 2007

At 08:30 AM 8/16/2007, special_dragonfly wrote:
>I need to return the date yesterday in the form DDMMYYYY. I looked through
>the modules: time, datetime and calendar but can't find anything that leaps
>out at me.
>The problem I'm having is that although I can use time.localtime and get a
>tuple of the year, month, day and so forth, I don't believe I can just minus
>1 from the day, because I don't think it's cyclic, also, I can't see the
>date being linked in with the month.
>So is there any way of getting yesterdays date?

The question has already been well-answered, but since I've found 
using the datetime module to be tough going, I was wondering if 
either of these would be easier to understand and use:
1. <http://www.egenix.com/products/python/mxBase/mxDateTime/>
I see that mxDateTime comes with a 55-page manual as a PDF.

2. <http://labix.org/python-dateutil>

Dick Moores

More information about the Python-list mailing list