| Modifier and Type | Field and Description |
|---|---|
| public static final DateTimeFormatter | FORMATTER_ASCTIME
Date formatter used to parse HTTP date headers in in ANSI C |
| public static final DateTimeFormatter | FORMATTER_RFC1036
Date formatter used to parse HTTP date headers in RFC 1036 format. |
| public static final DateTimeFormatter | FORMATTER_RFC1123
Date formatter used to parse HTTP date headers in RFC 1123 format. |
| public static final TimeZone | GMT
Deprecated
This attribute is no longer supported as a part of the public API.
|
| pack-priv static final ZoneId | |
| public static final String | PATTERN_ASCTIME
Date format pattern used to parse HTTP date headers in ANSI C
|
| public static final String | PATTERN_RFC1036
Date format pattern used to parse HTTP date headers in RFC 1036 format. |
| public static final String | PATTERN_RFC1123
Date format pattern used to parse HTTP date headers in RFC 1123 format. |
| public static final DateTimeFormatter[] | STANDARD_PATTERNS
Standard date formatters: |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | clearThreadLocal()
Deprecated
Noop method. Do not use.
Clears thread-local variable containing java. cache.
|
| public static String | Returns: A formatted instant string.Instant to format. instant, final DateTimeFormatter The pattern to use for formatting the instant. dateTimeFormatter)Formats the given date according to the specified pattern. |
| public static String | Returns: An RFC 1123 formatted date string.The date to format. date)
Deprecated
Use
Formats the given date according to the RFC 1123 pattern.
formatStandardDate(Instant)
|
| public static String | Returns: A formatted date string.The date to format. date, final String The pattern to use for formatting the date. pattern)
Deprecated
Use
Formats the given date according to the specified pattern.
formatDate(Instant, DateTimeFormatter)
|
| public static String | Returns: An RFC 1123 formatted instant string.Instant to format. instant)Formats the given instant according to the RFC 1123 pattern. |
| public static boolean | Returns: true if both messages contain a header with the given name
and the value of the header from the first message is newer that of
the second message.the first message message1, final MessageHeaders the second message message2, final String header name headerName)
Deprecated
This method is no longer supported as a part of the public API.
Tests if the first message is after (newer) than second one
using the given message header for comparison.
|
| public static boolean | Returns: true if both messages contain a header with the given name
and the value of the header from the first message is older that of
the second message.the first message message1, final MessageHeaders the second message message2, final String header name headerName)
Deprecated
This method is no longer supported as a part of the public API.
Tests if the first message is before (older) than the second one
using the given message header for comparison.
|
| public static Instant | Returns: the parsed instant or null if input could not be parsedthe instant value to parse dateValue, final DateTimeFormatter... the date/time formats to use dateFormatters)Parses the date value using the given date/time formats. |
| public static Date | Returns: the parsed date or null if input could not be parsedthe date value to parse dateValue)
Deprecated
Use
Parses a date value.
parseStandardDate(String)
|
| public static Date | Returns: the parsed date or null if input could not be parsedmessage headers headers, final String header name headerName)
Deprecated
Use
Parses a date value from a header with the given name.
parseStandardDate(MessageHeaders, String)
|
| public static Date | Returns: the parsed date or null if input could not be parsedthe date value to parse dateValue, final String[] the date/time formats to use dateFormats)
Deprecated
Use
Parses the date value using the given date/time formats.
parseDate(String, DateTimeFormatter.
|
| public static Date | Returns: the parsed date or null if input could not be parsedthe date value to parse dateValue, final String[] the date/time formats to use dateFormats, final Date During parsing, two digit years will be placed in the range
startDate)startDate to startDate + 100 years. This value may
be null. When null is given as a parameter, year
2000 will be used.
Deprecated
Use
Parses the date value using the given date/time formats.
parseDate(String, DateTimeFormatter.
|
| public static Instant | Returns: the parsed instant or null if input could not be parsedthe instant value to parse dateValue)Parses the instant value using the standard date/time formats ( |
| public static Instant | Returns: the parsed instant or null if input could not be parsedmessage headers headers, final String header name headerName)Parses an instant value from a header with the given name. |
| public static Date | |
| public static Instant | |
| public static LocalDateTime | |
| public static LocalDateTime |
| FORMATTER_ASCTIME | back to summary |
|---|---|
| public static final DateTimeFormatter FORMATTER_ASCTIME Date formatter used to parse HTTP date headers in in ANSI C
| |
| FORMATTER_RFC1036 | back to summary |
|---|---|
| public static final DateTimeFormatter FORMATTER_RFC1036 Date formatter used to parse HTTP date headers in RFC 1036 format.
| |
| FORMATTER_RFC1123 | back to summary |
|---|---|
| public static final DateTimeFormatter FORMATTER_RFC1123 Date formatter used to parse HTTP date headers in RFC 1123 format.
| |
| GMT | back to summary |
|---|---|
| public static final TimeZone GMT
Deprecated This attribute is no longer supported as a part of the public API. | |
| GMT_ID | back to summary |
|---|---|
| pack-priv static final ZoneId GMT_ID | |
| PATTERN_ASCTIME | back to summary |
|---|---|
| public static final String PATTERN_ASCTIME Date format pattern used to parse HTTP date headers in ANSI C
| |
| PATTERN_RFC1036 | back to summary |
|---|---|
| public static final String PATTERN_RFC1036 Date format pattern used to parse HTTP date headers in RFC 1036 format. | |
| PATTERN_RFC1123 | back to summary |
|---|---|
| public static final String PATTERN_RFC1123 Date format pattern used to parse HTTP date headers in RFC 1123 format. | |
| STANDARD_PATTERNS | back to summary |
|---|---|
| public static final DateTimeFormatter[] STANDARD_PATTERNS Standard date formatters:
| |
| DateUtils | back to summary |
|---|---|
| private DateUtils() This class should not be instantiated. | |
| clearThreadLocal | back to summary |
|---|---|
| public static void clearThreadLocal()
Deprecated Noop method. Do not use. Clears thread-local variable containing
| |
| formatDate | back to summary |
|---|---|
| public static String formatDate(final Instant instant, final DateTimeFormatter dateTimeFormatter) Formats the given date according to the specified pattern.
| |
| formatDate | back to summary |
|---|---|
| public static String formatDate(final Date date)
Deprecated Formats the given date according to the RFC 1123 pattern.
| |
| formatDate | back to summary |
|---|---|
| public static String formatDate(final Date date, final String pattern)
Deprecated Formats the given date according to the specified pattern.
| |
| formatStandardDate | back to summary |
|---|---|
| public static String formatStandardDate(final Instant instant) Formats the given instant according to the RFC 1123 pattern.
| |
| isAfter | back to summary |
|---|---|
| public static boolean isAfter(final MessageHeaders message1, final MessageHeaders message2, final String headerName)
Deprecated This method is no longer supported as a part of the public API. Tests if the first message is after (newer) than second one using the given message header for comparison.
| |
| isBefore | back to summary |
|---|---|
| public static boolean isBefore(final MessageHeaders message1, final MessageHeaders message2, final String headerName)
Deprecated This method is no longer supported as a part of the public API. Tests if the first message is before (older) than the second one using the given message header for comparison.
| |
| parseDate | back to summary |
|---|---|
| public static Instant parseDate(final String dateValue, final DateTimeFormatter... dateFormatters) Parses the date value using the given date/time formats.
| |
| parseDate | back to summary |
|---|---|
| public static Date parseDate(final String dateValue)
Deprecated Parses a date value. The formats used for parsing the date value are retrieved from the default http params. | |
| parseDate | back to summary |
|---|---|
| public static Date parseDate(final MessageHeaders headers, final String headerName)
Deprecated Parses a date value from a header with the given name.
| |
| parseDate | back to summary |
|---|---|
| public static Date parseDate(final String dateValue, final String[] dateFormats)
Deprecated Parses the date value using the given date/time formats.
| |
| parseDate | back to summary |
|---|---|
| public static Date parseDate(final String dateValue, final String[] dateFormats, final Date startDate)
Deprecated Parses the date value using the given date/time formats.
| |
| parseStandardDate | back to summary |
|---|---|
| public static Instant parseStandardDate(final String dateValue) Parses the instant value using the standard date/time formats ( | |
| parseStandardDate | back to summary |
|---|---|
| public static Instant parseStandardDate(final MessageHeaders headers, final String headerName) Parses an instant value from a header with the given name.
| |
| toDate | back to summary |
|---|---|
public static Date toDate(final Instant instant)
| |
| toInstant | back to summary |
|---|---|
public static Instant toInstant(final Date date)
| |
| toUTC | back to summary |
|---|---|
public static LocalDateTime toUTC(final Instant instant)
| |
| toUTC | back to summary |
|---|---|
public static LocalDateTime toUTC(final Date date)
| |