Skip to content
Advertisement

Format negative amount of USD with a minus sign, not brackets (Java)

How do I get NumberFormat.getCurrencyInstance() to print negative USD currency values with a minus sign?

Advertisement

Answer

Since I faced this problem again, I did some research and found a more resilient solution provided by the ICU:

JavaScript

Check the API documentation of NumberFormatter for more details.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement