mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-28 23:57:27 +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:
parent
a41a7e60b1
commit
abc22d4e21
@ -261,11 +261,11 @@ public class Util
|
|||||||
|
|
||||||
public static String formatCurrency(double value)
|
public static String formatCurrency(double value)
|
||||||
{
|
{
|
||||||
return "$" + Double.valueOf(df.format(value));
|
return "$" + df.format(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double roundDouble(double d)
|
public static double roundDouble(double d)
|
||||||
{
|
{
|
||||||
return Double.valueOf(df.format(d));
|
return Math.round(d*100.0)/100.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user