nstjelja at gmail.com
Thu Aug 2 08:51:50 CEST 2007
On 8/1/07, Robert Dailey <rcdailey at gmail.com> wrote:
> 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?
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...
More information about the Python-list