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 StringformatISODateTime(Instant p_dt) Format the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z').static StringformatISODateTime(Date p_dt) Format the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z').static StringFormat the given date in the standard UTC ISO format, with milliseconds (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').static StringformatISODateTimeMillis(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.InstanceDeprecated.The static methods of this class are thread-safe so there is no need to create an instance of this utility.static DateparseISODateTime(String p_str) Parse the given date in the standard UTC ISO format (yyyy-MM-dd'T'HH:mm:ss'Z').static DateparseISODateTimeMillis(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 DateParse 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
-
UTC_ISO_DATE_TIME_FORMAT
The standard ISO UTC formatyyyy-MM-dd'T'HH:mm:ss'Z'.- See Also:
-
UTC_ISO_DATE_TIME_FORMAT_MILLIS
The standard ISO UTC format with millisecondsyyyy-MM-dd'T'HH:mm:ss.SSS'Z'.- See Also:
-
-
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.