Long arithmetic...?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Long arithmetic...?

THOMAS, BRIAN M (ATTSI)
It seems that a Velocity #set directive fails when the RHS involves any
arithmetic operation with long integers.

Specifically, I just wanted to determine the difference between two
dates, thus:

#set ($age = $xwiki.currentDate.time -
$obj.xWikiObject.getDateValue("donedate").time)

I confirmed that I got credible results from both of the operands by
printing them, and I could assign either of them to another variable
name, but setting $age to the result of any arithmetic operation with
any of them always gave "$age" as the formatted result.

This shouldn't be this hard, should it?

brain[sic]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws