On Wed, Jun 2, 2010 at 1:09 PM, Tihomir Culjaga <tculjaga@gmail.com> wrote:


On Tue, Jun 1, 2010 at 4:50 PM, David Ponzone <david.ponzone@gmail.com> wrote:
Tihomir,

you can do that yourself with expr.

h = expr floor(credit_time/3600)
m = expr floor(mod(credit_time,3600)/60)
s = expr mod(credit_time,60)

Just convert that to the right $expr{} syntax.



cool, it works:

      <action application="log" data="INFO  TRANSFORM MINUTES=>>>> TIME=${expr(floor(405/3600))}:${expr(floor(mod(405,3600)/60))}:${expr(mod(405,60))}"/>

Thanks!



and finally its like this:

       <macro name="timeleft_sec">
         <input pattern="(\d+)">
           <match>
             <action function="say" data="${expr(floor($1/3600))}:${expr(floor(mod($1,3600)/60))}:${expr(mod($1,60))}"
                     method="pronounced"
                     type="time_measurement"/>
           </match>
         </input>
       </macro>