[Tutor] does anyone know the time module
Ivan Van Laningham
ivanlan@home.com
Tue, 16 May 2000 06:26:41 -0600
Hi All--
> John Choi wrote:
>
> Hi everyone:
>
> I've been working my way through Ivan's book and find the examples to
> be the biggest help in learning Python. Most excellent learning guide
> Ivan!
>
Thanks!
> I'd like to start doing stuff with time...
>
> Using two dates as user-input strings in this format DD-MM-YY, find
> the number of days between them.
>
Unless you want to figure out exactly how this is done to help you learn
more about the mechanics of calendrical systems, you might look into
Mark-Andre's mxDateTime package. Check
http://www.python.org/
for links, or check Parnassus
http://www.vex.net/parnassus/
If you want to find out more about calendars, look at the Calendar FAQ:
http://www.pauahtun.org/CalendarFAQ/
> I'd also like to put to use the leap.py program to determine Gregorian
> leap years, i.e 365 versus 366 days in a year.
>
python leap.py 0 100 200 300 400
;-) You can modify the source to have it print out the number of days
in a year if you want.
<the-downward-road-is-crowded-crowded>-ly y'rs,
Ivan
----------------------------------------------
Ivan Van Laningham
Axent Technologies, Inc.
http://www.pauahtun.org/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours