[Zope] Calculate values?

Peter Arvidsson peter@innodev.com
Thu, 06 Jul 2000 19:20:27 +0200


Chris Withers wrote:

> Peter Arvidsson wrote:
> >
> > I am about to do
> > <dtml-call "REQUEST.set('a', (a - b) * 15">
>
> I presume that should be:
> <dtml-call "REQUEST.set('a', (a - b) * 15)">
> ? ;-)
>
> Anyway, two options:
>
> 1. On your form, change your input to be:
> <input type="TEXT" name="a:int">
>
> 2. Change your call to be:
> <dtml-call "REQUEST.set('a', (_.int(a) - _.int(b)) * 15)">
>
> cheers,
>
> Chris

At the same level, what is the easiest way to calculate the difference
(in minutes) between two given times in a form (HHMM)? Is there any easy
way to do this or do I have to do something complicate?