Skip to content
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

Question: does money formatting support rendering $1 instead of $1.00? #79

Open
dbaggott opened this issue Oct 19, 2017 · 2 comments
Open
Labels

Comments

@dbaggott
Copy link

Hi, first, thank you for your hard work and contributions to the community.

Second, is it possible to render Money.of(USD, 1) as "1" instead of "1.00"? I thought withForcedDecimalPoint(false) might do the trick, but it doesn't...

In short, is there a way to get this test to pass?

MoneyFormatter moneyFormatter = new MoneyFormatterBuilder()
        .appendAmountLocalized()
        .toFormatter(US);
assertThat(moneyFormatter.print(Money.of(USD, 1))).isEqualTo("1");
@dbaggott dbaggott changed the title Question: does money formatting support "dropping" 0 cents? Question: does money formatting support rendering $1 instead of $1.00? Oct 20, 2017
@jodastephen
Copy link
Member

There is no support for filtering in the formatter at the moment (which is what this is really a request for).

@dbaggott
Copy link
Author

@jodastephen, thanks for the reply.

What's the rough scope of adding filtering support, do you already have a clear design in mind and, most importantly, is it something you're interested in PRs for?

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

No branches or pull requests

2 participants