1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 17:45:08 +02:00

[trunk] Fix formatCurrency and roundDouble (it breaks on non-us locales)

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1381 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo
2011-05-08 23:57:44 +00:00
parent 1b8fef0bf1
commit d474962558

View File

@@ -261,11 +261,11 @@ public class Util
public static String formatCurrency(double value)
{
return "$" + Double.valueOf(df.format(value));
return "$" + df.format(value);
}
public static double roundDouble(double d)
{
return Double.valueOf(df.format(d));
return Math.round(d*100.0)/100.0;
}
}