List of utility methods to do Locale Format
String | formatDouble(double value) format Double return DOUBLE_FORMATTER.format(value);
|
String | formatDouble(final Double value) format Double return FORMATTER.format(value);
|
String | formatDouble(Locale locale, double value) format Double NumberFormat numberFormat = NumberFormat.getInstance(locale);
return numberFormat.format(value);
|
String | formatDouble(Number value) format Double if (value == null) { return "0"; return doubleFormat.format(value); |
String | formatDouble(String pattern, double value) format Double Locale currentLocale = Locale.getDefault();
NumberFormat nf = NumberFormat.getNumberInstance(currentLocale);
DecimalFormat df = (DecimalFormat) nf;
df.applyPattern(pattern);
return df.format(value);
|
String | formatDoubleToCSV(double d) format Double To CSV return format.format(d).replaceAll(frenchSpace, ""); |
String | formatDuration(long nanoTime) format Duration double seconds = nanoTime / 1.0e9; DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.US); DecimalFormat formatter = new DecimalFormat("0.000", symbols); return formatter.format(seconds); |
String | formatedDate(Date date) format date into my locale if (date == null) { date = new Date(); return dateFormatter.format(date); |
String | formatElapsedTime(double runTime) format Elapsed Time NumberFormat numberFormat = NumberFormat.getInstance(Locale.ENGLISH);
return numberFormat.format(runTime / MS_PER_SEC);
|
String | formatEn(T date, String pattern) format En if (date == null) return null; try { SimpleDateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH); String result = df.format(date); return result; } catch (Exception e) { return null; ... |