strftime - %a is always Monday ?
Jeff Epler
jepler at unpythonic.net
Mon Dec 29 08:46:03 EST 2003
On Mon, Dec 29, 2003 at 02:39:13PM +0100, Gerrit Holl wrote:
> time.strftime does not know about dates. Field number 6 specifies the
> weekday: make it a 1 and it will say Tuesday, 2->Wednesday, etc. You may
> want to use the new datetime module:
> >>> datetime.date(2003,12,7).strftime("%A")
> 'Sunday'
Gerrit,
Sounds like much better advice than mine!
Jeff
More information about the Python-list
mailing list