JodaOrg / joda-money

Java library to represent monetary amounts.

Home Page:http://www.joda.org/joda-money/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Currency rounding based on smallest amount possible

frne opened this issue · comments

In some currencies (e.g. CHF), the smallest spendable amount is not 1, but 5 cents. So rounding a price to 2.73 doesn't not make much sense, because it's not payable. Instead it should be rounded to 2.75.

Is there any functionality / convenient way without wrapping the whole Money object?

The current code does not support this concept. There is a case to allow this data to be added to the currency files, but it would probably have to be opt-in.

+1 This built-in feature would be very welcome