You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Kailash Sethy <ka...@dot.state.mn.us> on 2005/06/03 23:32:17 UTC
handling -ve currency in $number.format('currency',$myNumber)
in velocity templates
Hi ,
If I use the $number.format('currency',$myNumber) for a -ve number,
the output becomes ($number)
$myNumber -> -13.55
$number.format('currency',$myNumber) -> ( $13.55)
How to show with -ve sign without parenthesis bracket after
formatting?
Regards
Kailash
Regards,
Kailash Ch. Sethy
Tata Consultancy Services
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: handling -ve currency in $number.format('currency',$myNumber) in velocity templates
Posted by Shinobu Kawai <sh...@gmail.com>.
Hi Kailash,
> If I use the $number.format('currency',$myNumber) for a -ve number,
> the output becomes ($number)
>
> $myNumber -> -13.55
> $number.format('currency',$myNumber) -> ( $13.55)
>
> How to show with -ve sign without parenthesis bracket after
> formatting?
I'm not sure what a "-ve sign" is, but you can give NumberTool a
custom format like this:
$number.format('$0.00',$myNumber)
Best regards,
-- Shinobu
--
Shinobu Kawai <sh...@gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org