Numbers#formatThousandsUnit returns false values #252

p-kp opened this Issue May 20, 2016 · 2 comments


None yet

2 participants

p-kp commented May 20, 2016 edited

Following numbers return wrong formated values:
#{of:formatThousandsUnit(179945, 'm')} -> 18 km
expected: 179,9 km
#{of:formatThousandsUnit(280306, 'm')} -> 28 km
expected: 280,3 km
#{of:formatThousandsUnit(550297, 'm')} -> 55 km
expected: 550,3 km

edit: I use Omnifaces v2.3

@BalusC BalusC closed this in fc1aa80 May 21, 2016
BalusC commented May 21, 2016 edited

That was embarrassing. Trailing zeroes were unintentionally stripped from non-fractional numbers as well. Fix is available in today's 2.4 snapshot. Thank you for reporting and improving OmniFaces!

Do note that the precision is 3, as documented. So the actual results are 180, 280 and 550.

p-kp commented May 23, 2016

Thank you! I tested it and it works like expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment