List of utility methods to do Locale Format
void | formatLines(String target, int maxLength, Locale currentLocale) Format lines. BreakIterator boundary = BreakIterator.getLineInstance(currentLocale); boundary.setText(target); int start = boundary.first(); int end = boundary.next(); int lineLength = 0; while (end != BreakIterator.DONE) { String word = target.substring(start, end); lineLength = lineLength + word.length(); ... |
String | formatLocaleDate(final java.util.Date date) Return a string representation of the supplied date with the current default locale. return formatLocaleDate(date, Locale.getDefault());
|
String | formatLocaleTime(long time, Locale locale) format Locale Time if (time == -1) return "-"; return DateFormat.getTimeInstance(DateFormat.SHORT, locale).format(new Date(time)); |
String | formatMailDate(Date date) Format the date. if (date != null) { DateFormat format = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.MEDIUM, SimpleDateFormat.SHORT, Locale.GERMAN); return format.format(date); } else { return ""; |
String | formatMessage(@Nonnull ResourceBundle bundle, @Nonnull String messageKey, @Nullable Object... args) format Message final String plainMessage = bundle.getString(messageKey); final String message = new MessageFormat(plainMessage, bundle.getLocale()).format(args); return message; |
String | formatMessage(String messageKey, Locale locale) format Message MessageFormat mf = new MessageFormat(getMessageString(messageKey, locale)); return mf.format(new Object[0]); |
String | formatMysqlDate(final Date date) Format mysql date. return formatDate(date, PATTERN_MYSQL);
|
String | formatNumber(double d, String pattern) format Number DecimalFormat dn = new DecimalFormat(pattern, dfs); return dn.format(d); |
String | formatNumber(long number) Pretty print the supplied number. return NumberFormat.getInstance(locale).format(number);
|
String | formatNumber(long value) format Number return NumberFormat.getInstance(Locale.ENGLISH).format(value);
|