Hi All,
I have recently made a fresh install of Lucee 6.2 on a new server. Since then the function currencyformat displays all negative numbers with parenthesis no matter what locale I set.
This can be reproduced using the code editor i.e. on LSCurrencyFormat() :: Lucee Documentation. If I use the “Lucee 6 Latest” as engine it puts parenthesis, if I change it to Lucee 5.4 LTS it doesn’t.
Is there a setting/file where I can change this? I would want negative without parenthesis.
Thanks for any help!
Kind regards Daniel
Don’t forget to tell us about your stack!
OS: Windows Server 2022 (10.0) 64bit Java Version: 21.0.6 (Eclipse Adoptium) 64bit Tomcat Version: Apache Tomcat/10.1.36 Lucee Version: 6.2.0.321
I see that ACF does the same thing. But I still don’t understand why negative numbers have parenthesis though. Is it some kind of international formatting convention(?) I have never used this kind of formatting… being in Germany most of the time…
Also, why should a negative “currency number” have parenthesis and a regular number not? Compare lsCurrencyFormat(-1) and lsNumberFormat(-1).
Anyhow, so I guess I have to use the LSnumberformat() and add my currency symbol whenever needed. Not much of a deal in my case. But it make the function lscurrencyformat useless to me.
The historical roots are in bookkeeping to visibly differentiate from positive amounts in financial statements. You’ll see parentheses, red text, etc as options for currency formatting in spreadsheet apps also.