ISO_DATETIME_FORMAT
public static final FastDateFormat ISO_DATETIME_FORMAT
ISO8601 formatter for date-time without time zone.
The format used is yyyy-MM-dd'T'HH:mm:ss.
ISO_DATETIME_TIME_ZONE_FORMAT
public static final FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT
ISO8601 formatter for date-time with time zone.
The format used is yyyy-MM-dd'T'HH:mm:ssZZ.
ISO_DATE_FORMAT
public static final FastDateFormat ISO_DATE_FORMAT
ISO8601 formatter for date without time zone.
The format used is yyyy-MM-dd.
ISO_DATE_TIME_ZONE_FORMAT
public static final FastDateFormat ISO_DATE_TIME_ZONE_FORMAT
ISO8601-like formatter for date with time zone.
The format used is yyyy-MM-ddZZ.
This pattern does not comply with the formal ISO8601 specification
as the standard does not allow a time zone without a time.
ISO_TIME_FORMAT
public static final FastDateFormat ISO_TIME_FORMAT
ISO8601 formatter for time without time zone.
The format used is 'T'HH:mm:ss.
ISO_TIME_NO_T_FORMAT
public static final FastDateFormat ISO_TIME_NO_T_FORMAT
ISO8601-like formatter for time without time zone.
The format used is HH:mm:ss.
This pattern does not comply with the formal ISO8601 specification
as the standard requires the 'T' prefix for times.
ISO_TIME_NO_T_TIME_ZONE_FORMAT
public static final FastDateFormat ISO_TIME_NO_T_TIME_ZONE_FORMAT
ISO8601-like formatter for time with time zone.
The format used is HH:mm:ssZZ.
This pattern does not comply with the formal ISO8601 specification
as the standard requires the 'T' prefix for times.
ISO_TIME_TIME_ZONE_FORMAT
public static final FastDateFormat ISO_TIME_TIME_ZONE_FORMAT
ISO8601 formatter for time with time zone.
The format used is 'T'HH:mm:ssZZ.
SMTP_DATETIME_FORMAT
public static final FastDateFormat SMTP_DATETIME_FORMAT
SMTP (and probably other) date headers.
The format used is EEE, dd MMM yyyy HH:mm:ss Z in US locale.
format
public static String format(Date date,
String pattern)
Format a date/time into a specific pattern.
date
- the date to formatpattern
- the pattern to use to format the date
format
public static String format(Date date,
String pattern,
Locale locale)
Format a date/time into a specific pattern in a locale.
date
- the date to formatpattern
- the pattern to use to format the datelocale
- the locale to use, may be null
format
public static String format(Date date,
String pattern,
TimeZone timeZone)
Format a date/time into a specific pattern in a time zone.
date
- the date to formatpattern
- the pattern to use to format the datetimeZone
- the time zone to use, may be null
format
public static String format(Date date,
String pattern,
TimeZone timeZone,
Locale locale)
Format a date/time into a specific pattern in a time zone and locale.
date
- the date to formatpattern
- the pattern to use to format the datetimeZone
- the time zone to use, may be null
locale
- the locale to use, may be null
format
public static String format(long millis,
String pattern)
Format a date/time into a specific pattern.
millis
- the date to format expressed in millisecondspattern
- the pattern to use to format the date
format
public static String format(long millis,
String pattern,
Locale locale)
Format a date/time into a specific pattern in a locale.
millis
- the date to format expressed in millisecondspattern
- the pattern to use to format the datelocale
- the locale to use, may be null
format
public static String format(long millis,
String pattern,
TimeZone timeZone)
Format a date/time into a specific pattern in a time zone.
millis
- the time expressed in millisecondspattern
- the pattern to use to format the datetimeZone
- the time zone to use, may be null
format
public static String format(long millis,
String pattern,
TimeZone timeZone,
Locale locale)
Format a date/time into a specific pattern in a time zone and locale.
millis
- the date to format expressed in millisecondspattern
- the pattern to use to format the datetimeZone
- the time zone to use, may be null
locale
- the locale to use, may be null
formatUTC
public static String formatUTC(Date date,
String pattern)
Format a date/time into a specific pattern using the UTC time zone.
date
- the date to formatpattern
- the pattern to use to format the date
formatUTC
public static String formatUTC(Date date,
String pattern,
Locale locale)
Format a date/time into a specific pattern using the UTC time zone.
date
- the date to formatpattern
- the pattern to use to format the datelocale
- the locale to use, may be null
formatUTC
public static String formatUTC(long millis,
String pattern)
Format a date/time into a specific pattern using the UTC time zone.
millis
- the date to format expressed in millisecondspattern
- the pattern to use to format the date
formatUTC
public static String formatUTC(long millis,
String pattern,
Locale locale)
Format a date/time into a specific pattern using the UTC time zone.
millis
- the date to format expressed in millisecondspattern
- the pattern to use to format the datelocale
- the locale to use, may be null