Package de.uplanet.util
Class ISODateTimeUtil
java.lang.Object
de.uplanet.util.ISODateTimeUtil
The static methods of this class are thread-safe.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatISODateTime
(Instant p_dt) Format the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z'
).static String
formatISODateTime
(Date p_dt) Format the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z'
).static String
Format the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).static String
formatISODateTimeMillis
(Date p_dt) Format the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).static ISODateTimeUtil.Instance
Deprecated.The static methods of this class are thread-safe so there is no need to create an instance of this utility.static Date
parseISODateTime
(String p_str) Parse the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z'
).static Date
parseISODateTimeMillis
(String p_str) Parse the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).static Date
Parse the given date in the standard UTC ISO format, with optional milliseconds (eitheryyyy-MM-dd'T'HH:mm:ss'Z'
, oryyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).
-
Field Details
-
Method Details
-
newInstance
Deprecated.The static methods of this class are thread-safe so there is no need to create an instance of this utility.Create an instance of the ISO date time utility.- Returns:
- A new instance of the utility.
-
formatISODateTime
Format the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z'
).- Parameters:
p_dt
- The date to be formatted.- Returns:
- The formatted date.
-
formatISODateTimeMillis
Format the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).- Parameters:
p_dt
- The date to be formatted.- Returns:
- The formatted date.
-
formatISODateTime
Format the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z'
).- Parameters:
p_dt
- The date to be formatted.- Returns:
- The formatted date.
-
formatISODateTimeMillis
Format the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).- Parameters:
p_dt
- The date to be formatted.- Returns:
- The formatted date.
-
parseISODateTime
Parse the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z'
).- Parameters:
p_str
- The date to be parsed, e.g.2013-12-24T17:00:00Z
.- Returns:
- The parsed date.
-
parseISODateTimeMillis
Parse the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).- Parameters:
p_str
- The date to be parsed, e.g.2013-12-24T17:00:00.123Z
.- Returns:
- The parsed date.
-
parseISODateTimeOptionalMillis
Parse the given date in the standard UTC ISO format, with optional milliseconds (eitheryyyy-MM-dd'T'HH:mm:ss'Z'
, oryyyy-MM-dd'T'HH:mm:ss.SSS'Z'
).- Parameters:
p_str
- The date to be parsed, e.g.2013-12-24T17:00:00.123Z
.- Returns:
- The parsed date.
-
ISODateTimeUtil
.