New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbers#formatThousandsUnit returns false values #252

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

Comments

Projects
None yet
2 participants
@p-kp

p-kp commented May 20, 2016

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

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC May 21, 2016

Member

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.

Member

BalusC commented May 21, 2016

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

This comment has been minimized.

Show comment
Hide comment
@p-kp

p-kp May 23, 2016

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

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