Real World Web Services
|
Date and time formatting utilites and constants. Formatting is performed using the FastDateFormat class. public static final FastDateFormat ISO_DATETIME_FORMAT
ISO8601 formatter for date-time witout time zone. The format used is yyyy-MM-dd'T'HH:mm:ss. 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. public static final FastDateFormat ISO_DATE_FORMAT ISO8601 formatter for date without time zone. The format used is yyyy-MM-dd. 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. public static final FastDateFormat ISO_TIME_FORMAT
ISO8601 formatter for time without time zone. The format used is 'T'HH:mm:ss. public static final FastDateFormat ISO_TIME_TIME_ZONE_FORMAT
ISO8601 formatter for time with time zone. The format used is 'T'HH:mm:ssZZ. 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. 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. 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 U.S. locale. Constructor Detail
public DateFormatUtils() DateFormatUtils instances should NOT be constructed in standard programming. This constructor is public to permit tools that require a JavaBean instance to operate. Method Detail
public static java.lang.String formatUTC(long millis, java.lang.String pattern)
Format a date/time into a specific pattern using the UTC time zone. Parameters: millisthe date to format expressed in milliseconds patternthe pattern to use to format the date Returns: the formatted date public static java.lang.String formatUTC(java.util.Date date, java.lang.String pattern)
Format a date/time into a specific pattern using the UTC time zone. Parameters: datethe date to format patternthe pattern to use to format the date Returns: the formatted date [View full width] public static java.lang.String formatUTC(long millis, java.lang.String pattern, java.util
Format a date/time into a specific pattern using the UTC time zone. Parameters: millisthe date to format expressed in milliseconds patternthe pattern to use to format the date localethe locale to use, may be null Returns: the formatted date [View full width] public static java.lang.String formatUTC(java.util.Date date, java.lang.String pattern,Format a date/time into a specific pattern using the UTC time zone. Parameters: datethe date to format patternthe pattern to use to format the date localethe locale to use, may be null Returns: the formatted date public static java.lang.String format(long millis, java.lang.String pattern)
Format a date/time into a specific pattern. Parameters: millisthe date to format expressed in milliseconds patternthe pattern to use to format the date Returns: the formatted date public static java.lang.String format(java.util.Date date, java.lang.String pattern)
Format a date/time into a specific pattern. Parameters: datethe date to format patternthe pattern to use to format the date Returns: the formatted date [View full width] public static java.lang.String format(long millis, java.lang.String pattern, java.util
Format a date/time into a specific pattern in a time zone. Parameters: millisthe time expressed in milliseconds patternthe pattern to use to format the date timeZonethe time zone to use, may be null Returns: the formatted date [View full width] public static java.lang.String format(java.util.Date date, java.lang.String pattern, java
Format a date/time into a specific pattern in a time zone. Parameters: datethe date to format patternthe pattern to use to format the date timeZonethe time zone to use, may be null Returns: the formatted date [View full width] public static java.lang.String format(long millis, java.lang.String pattern, java.utilFormat a date/time into a specific pattern in a locale. Parameters: millisthe date to format expressed in milliseconds patternthe pattern to use to format the date localethe locale to use, may be null Returns: the formatted date [View full width] public static java.lang.String format(java.util.Date date, java.lang.String pattern, java
Format a date/time into a specific pattern in a locale. Parameters: datethe date to format patternthe pattern to use to format the date localethe locale to use, may be null Returns: the formatted date [View full width] public static java.lang.String format(long millis, java.lang.String pattern, java.util
Format a date/time into a specific pattern in a time zone and locale. Parameters: millisthe date to format expressed in milliseconds patternthe pattern to use to format the date timeZonethe time zone to use, may be null localethe locale to use, may be null Returns: the formatted date public static java.lang.String format(java.util.Date date, java.lang.String pattern, java.util.TimeZone timeZone, java.util.Locale locale) Format a date/time into a specific pattern in a time zone and locale. Parameters: datethe date to format patternthe pattern to use to format the date timeZonethe time zone to use, may be null localethe locale to use, may be null Returns: the formatted date |
|