[Tutor] date function

Andrei Kulakov ak@silmarill.org
Tue, 04 Sep 2001 17:31:31 -0400


On Tue, Sep 04, 2001 at 02:24:15PM -0700, Jerry Lake wrote:
> Does python have a date function ?
> I didn't stumble across it in the 
> docs. if so, where can I read about it.

Certainly - it's in time module, since time and date are kind of related.
It'd probably be useful to have a date module too that would be another
name for time.. There's also MxDateTime that should have more goods for
date manipulations.

Here's an example of usage of time module:

>>> import time
>>> time.localtime()
(2001, 9, 4, 17, 29, 48, 1, 247, 1)
>>> time.ctime(time.time())
'Tue Sep  4 17:30:03 2001'

Plain time.ctime() does the same in later versions but not in 1.5 iirc.

[snip]

- Andrei 

-- 
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org