Calculating Year, Month and Day of Life

Ian Bicking ianb at
Sat Jul 5 22:49:26 CEST 2003

On Sat, 2003-07-05 at 12:48, hokiegal99 wrote:
> Hello,
> I am a funeral director trying to write a small program that calculates 
> the number of years, months and days a person has lived by entering the 
> year, month and day of their birth. This is what I have so far:

You might want to look at mxDateTime, or Python 2.3's datetime module,
which will probably provide functions to make this calculation
significantly easier -- counting days in years, adjusting for leap
years, etc.  Well, that's if you want to be exact, which may not really
be important.


More information about the Python-list mailing list