Package com.linkedin.alpini.base.misc
Enum Class DateUtils
- All Implemented Interfaces:
Serializable
,Comparable<DateUtils>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
escapedSplit
(String escape, String split, String target) Splits a target string according to some substring (non-regex), which may be escaped in the target string.static String
getAnsiCDate
(long timeMillis) static String
getAnsiCDate
(Date date) static String
getRFC1036Date
(long timeMillis) static String
getRFC1036Date
(Date date) static String
getRFC1123Date
(long timeMillis) static String
getRFC1123Date
(Date date) static Date
static Date
parseRFC1123Date
(String dateValue) static DateUtils
Returns the enum constant of this class with the specified name.static DateUtils[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SINGLETON
-
-
Field Details
-
RFC1123_DATE_FORMAT
- See Also:
-
RFC1036_DATE_FORMAT
- See Also:
-
ASCTIME_DATE_FORMAT
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getRFC1123Date
-
getRFC1123Date
-
getRFC1036Date
-
getRFC1036Date
-
getAnsiCDate
-
getAnsiCDate
-
parseRFC1123Date
-
parseDate
-
escapedSplit
Splits a target string according to some substring (non-regex), which may be escaped in the target string. E.g. escapedSplit("\\", ":", "urn\\:li\\:test:val") returns ["urn\\:li\\:test", "val"]- Parameters:
escape
- The escape sequence (if present in target, it must itself also be escaped)split
- The substring on which to tokenize.target
- The string to split- Returns:
- An array of tokens, split on a substring
-