[Zope] Calculate difference between time input?

Shane Hathaway shane@digicool.com
Fri, 07 Jul 2000 10:50:12 -0400


Peter Arvidsson wrote:
> 
> How do I calculate the difference between two times I get from a from?
> 
> Lets say time a = 09:45
> and time b = 11:15
> 
> Then I want to calculate the difference. How do I calculate it? I'd also
> like to know how to get the answers in differen formats. For example
> caculating the input above I want to be able to get all of the following
> results:
> 1:30 (One hour and thirty minutes)
> 1,5 (One and a half hour)
> 90 (Ninety minutes)

The mxDateTime package can do this.  You can access it through External
Methods.

Sorry there isn't an easier way yet. :-(

http://starship.python.net/~lemburg/mxDateTime.html

Shane