Newbie: Subtracting Dates

Skip Montanaro skip at pobox.com
Thu Dec 5 15:23:40 EST 2002


>>>>> "Bernard" == Bernard Delmée <bdelmee at advalvas._ZAPME_.be> writes:

    >> Basically, I would like to create a program that subtracts Date #1
    >> from Date #2.  The output would give the total number of "years",
    >> "months", and "days" in between dates.  Like the following example:

    Bernard> The std lib has the 'time' module, but it is a tad limited.
    Bernard> For something more comprehensive, including date aritmetic, see
    Bernard> http://www.lemburg.com/files/python/mxDateTime.html

Also, for the adventurous with CVS access looking for something lower level,
check out nondist/sandbox/datetime.  Tim has been working furiously on in
for the past week or two.

-- 
Skip Montanaro - skip at pobox.com
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list