Time object?

Nikola Stjelja nstjelja at gmail.com
Thu Aug 2 08:51:50 CEST 2007

On 8/1/07, Robert Dailey <rcdailey at gmail.com> wrote:
> Hi,
> I'm well aware of the datetime module, however it is really inconsistent
> and useless to me. In order to do any arithmetic on time objects, I have to
> use the 'timedelta' class, which doesn't even allow me to do all the math I
> want to do.
> For example, I want to do "1 / timeobj", where timeobj might represent a
> time in the format of "00:00:00.000000". Do I have to code my own class
> for this, or is there some other third party library out there that will
> allow me to do this?
> Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list

Convert each date you use to a timestamp, make all your calculations using
those timestamps, and then when you need a date back just convert the
desired timestamp to date time format of your choosing.

Please visit this site and play my RPG!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070802/a3111462/attachment.html>

More information about the Python-list mailing list