Java Utililty Methods Locale Format

List of utility methods to do Locale Format

Description

The list of methods to do Locale Format are organized into topic(s).

Method

Stringformat(BigInteger amount)
format
if (amount == null) {
    return null;
DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Locale.GERMAN);
otherSymbols.setDecimalSeparator(',');
otherSymbols.setGroupingSeparator('.');
DecimalFormat df = new DecimalFormat("###,###,###,##0", otherSymbols);
return df.format(amount);
...
Stringformat(Date d, Locale locale)
This method formats a Date to a String
return format(d, locale, DateFormat.FULL);
Stringformat(Date d, String format)
format
return format(d, format, Locale.getDefault());
Stringformat(Date date)
format
return format(date, "yyyy-MM-dd");
Stringformat(Date date)
Formats a Date based on the default Locale If teh Date is null returns an empty String
if (date == null)
    return ""; 
return dateFormat.format(date);
Stringformat(Date date, String format)
Esta funcion formatea una fecha
if (format == null)
    format = FORMATO_FECHA_GUION;
sdf = new SimpleDateFormat(format, new Locale("es"));
return sdf.format(date);
Stringformat(Date date, String format, Locale locale)
Format date to String.
if (date != null && format != null && locale != null) {
    return new SimpleDateFormat(format, Locale.ENGLISH).format(date);
return null;
Stringformat(Date date, String parttern)
format
if (date == null) {
    return "";
if (parttern == null || parttern.equals("")) {
    return "";
SimpleDateFormat formater = new SimpleDateFormat(parttern, Locale.ENGLISH);
return formater.format(date);
...
Stringformat(Date date, String pattern)

Formats a date/time into a specific pattern.

return format(date, pattern, null);
Stringformat(Date date, String pattern)
format
String result = null;
result = "";
if (date != null) {
    SimpleDateFormat formatter = new SimpleDateFormat();
    formatter.applyPattern(pattern);
    result = formatter.format(date);
return result;
...