You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "THOMAS, BRIAN M (SBCSI)" <bt...@att.com> on 2006/03/04 00:49:10 UTC

Arithmetic expressions?

>From looking at the reference manual, user's guide, FAQ, and
mailing-list archives I see no hope at all for doing something as simple
as figuring out the difference of two dates, because no long values
(such as Date.getTime() returns) can participate in the RHS of any
arithmetic expression.

So, since Velocity has been around and people have been using it, what
am I missing?  Does no one care to do arithmetic on long values, or is
there a way to do it and no one's willing to share such a costly secret?

brain[sic] 

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Arithmetic expressions?

Posted by Nathan Bubna <nb...@gmail.com>.
the Velocity community has changed its stance on this issue. 
arithmetic with any number type now works in the current code and will
be included in the next release.

if you are not willing to use the unreleased code, then you can always
use the MathTool from the VelocityTools project.  it's certainly no
secret. :)

On 3/3/06, THOMAS, BRIAN M (SBCSI) <bt...@att.com> wrote:
> From looking at the reference manual, user's guide, FAQ, and
> mailing-list archives I see no hope at all for doing something as simple
> as figuring out the difference of two dates, because no long values
> (such as Date.getTime() returns) can participate in the RHS of any
> arithmetic expression.
>
> So, since Velocity has been around and people have been using it, what
> am I missing?  Does no one care to do arithmetic on long values, or is
> there a way to do it and no one's willing to share such a costly secret?
>
> brain[sic]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org