obouillaud wrote:
> I think there is a bug on the rounding method of
LSCurrencyformat and (in my
> case) LSEurocurrencyFormat
i just tested w/core java using:
<cfscript>
numbers=listToArray("55.905,55.915,55.925,55.935,55.945,55.955,55.965,55.975,55.985,55.995,55.005");
locale=createObject("java","java.util.Locale").init("fr","FR");
nf=createObject("java","java.text.NumberFormat").getCurrencyInstance(locale);
for (i=1; i <= arrayLen(numbers); i++) {
writeoutput("#numbers
#-#nf.Format(javaCast("double",numbers))# <br>");
}
</cfscript>
which produced
55.905 - 55,90 â¬
55.915 - 55,92 â¬
55.925 - 55,92 â¬
55.935 - 55,94 â¬
55.945 - 55,94 â¬
55.955 - 55,96 â¬
55.965 - 55,96 â¬
55.975 - 55,98 â¬
55.985 - 55,98 â¬
55.995 - 56,00 â¬
55.005 - 55,00 â¬
so, yup, looks like a bug w/that method. dollarFormat doesn't
seem to show this
behavior w/your numbers. icu4j's numberFormat class (using
currency &
currencyAmount classes) work fine as well.
i'll bring to the cf's team attention.