Package org.apache.juneau.commons.utils
Class DateUtils
java.lang.Object
org.apache.juneau.commons.utils.DateUtils
A utility class for parsing and formatting HTTP dates as used in cookies and other headers.
This class handles dates as defined by RFC 2616 section 3.3.1 as well as some other common non-standard formats.
This class was copied from HttpClient 4.3.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeFormattergetDateTimeFormatter(String pattern) Returns aDateTimeFormatterusing either a pattern or predefined pattern name.
-
Constructor Details
-
DateUtils
public DateUtils()
-
-
Method Details
-
getDateTimeFormatter
Returns aDateTimeFormatterusing either a pattern or predefined pattern name.- Parameters:
pattern- The pattern (e.g."yyyy-MM-dd" ) or pattern name (e.g."ISO_INSTANT" ).- Returns:
- The formatter.
-