Java Utililty Methods yyyy

List of utility methods to do yyyy

Description

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

Method

Stringformat(java.util.Date date, String pattern)
format: returns the formatted date as String.
if (date != null) {
    return new SimpleDateFormat(pattern).format(date);
} else {
    return null;
Stringformat(Object value, String pattern)
format
if (value == null)
    return VALUE_BLANK;
if (value instanceof Number) {
    DecimalFormat df = null;
    if (pattern == null || VALUE_BLANK.equals(pattern)) {
        df = new DecimalFormat("#.####################");
    } else {
        df = new DecimalFormat(pattern);
...
Stringformat(ResourceBundle idioma, Date date)
format
String str = "";
if (date != null) {
    SimpleDateFormat df = new SimpleDateFormat(getDatePattern(idioma));
    str = df.format(date);
return str;
Dateformat(String dateString)
format
try {
    return dateFormat4.parse(dateString);
} catch (ParseException e) {
    e.printStackTrace();
return null;
Stringformat(String oldPattern, String newPattern, String data)
format
Date date = parseStringAsDate(oldPattern, data);
return parseAsString(newPattern, date);
Stringformat2(Date data)
format
return sdf2.format(data);
Stringformat6chars(Date date)
formatchars
return format(date, get6charDateFormat());
Stringformat6chars(Date date, TimeZone tz)
formatchars
SimpleDateFormat formatter = get6charDateFormat();
formatter.setTimeZone(tz);
return format(date, formatter);
StringformatAddDate(String src, String pattern, int amount)
format Add Date
Calendar cal;
cal = parseCalendar(src, pattern);
cal.add(Calendar.DATE, amount);
return formatDate(cal);
StringformatarData(Date data)
formatar Data
return formatar(data, FORMATO_DATA_DD_MM_AAAA_BARRA);