Java Utililty Methods Hour Format

List of utility methods to do Hour Format

Description

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

Method

Stringformat()
format
return toInfo(getCalendar());
Stringformat()
format
Date date = new Date();
return dateFormat.format(date);
Stringformat(Calendar date)
Formats a date such that it can be included in an HTTP header.
DateFormat dateFormat = new SimpleDateFormat(HTTP_DATE_FORMAT);
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
return dateFormat.format(date.getTime());
Stringformat(Date d)
Return the default formatted String for a given date.
String format = DATE_FORMATS[0];
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(d);
Stringformat(Date d)
format
return df.format(d);
Stringformat(Date d)
Format the Date timestamp to a human-readable timestamp.
return def.format(d);
Stringformat(Date date)
format
return RFC822_DATE_FORMAT.format(date);
Stringformat(Date date)
format
if (date == null) {
    return null;
return dateFormat.format(date);
Stringformat(Date date)
format
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(rfc822DateFormat);
return simpleDateFormat.format(date);
Stringformat(Date date)
Formats a Date value into a ISO8601-compliant date/time string.
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return format(cal);