Rewrote function for better reliability
This commit is contained in:
@@ -27,13 +27,6 @@ public final class FormattingUtil {
|
||||
* @return formatted price
|
||||
*/
|
||||
public static String formatEuro(final double amount) {
|
||||
// Set up environment
|
||||
Locale locale = Locale.GERMANY;
|
||||
Currency currency = Currency.getInstance("EUR");
|
||||
NumberFormat numberFormat = NumberFormat.getCurrencyInstance(locale);
|
||||
|
||||
numberFormat.setCurrency(currency);
|
||||
|
||||
return numberFormat.format(amount);
|
||||
return String.format(Locale.GERMAN, "%,.2f", amount) + " €";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user