Package de.uplanet.util
Class ISODateTimeUtil
- java.lang.Object
-
- de.uplanet.util.ISODateTimeUtil
-
@Scriptable public final class ISODateTimeUtil extends Object
The static methods of this class are thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classISODateTimeUtil.InstanceDeprecated.Use the static methods ofISODateTimeUtil.
-
Field Summary
Fields Modifier and Type Field Description static StringUTC_ISO_DATE_TIME_FORMATThe standard ISO UTC formatyyyy-MM-dd'T'HH:mm:ss'Z'.static StringUTC_ISO_DATE_TIME_FORMAT_MILLISThe standard ISO UTC format with millisecondsyyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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 StringformatISODateTimeMillis(Instant p_dt)Format 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.InstancenewInstance()Deprecated.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 DateparseISODateTimeOptionalMillis(String p_str)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 Detail
-
UTC_ISO_DATE_TIME_FORMAT
public static final String UTC_ISO_DATE_TIME_FORMAT
The standard ISO UTC formatyyyy-MM-dd'T'HH:mm:ss'Z'.- See Also:
- Constant Field Values
-
UTC_ISO_DATE_TIME_FORMAT_MILLIS
public static final String UTC_ISO_DATE_TIME_FORMAT_MILLIS
The standard ISO UTC format with millisecondsyyyy-MM-dd'T'HH:mm:ss.SSS'Z'.- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
@Deprecated(since="Intrexx 7") public static ISODateTimeUtil.Instance 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
public static String formatISODateTime(Instant p_dt)
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
public static String formatISODateTimeMillis(Instant p_dt)
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
public static String formatISODateTime(Date p_dt)
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
public 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').- Parameters:
p_dt- The date to be formatted.- Returns:
- The formatted date.
-
parseISODateTime
public static Date parseISODateTime(String p_str)
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
public 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').- Parameters:
p_str- The date to be parsed, e.g.2013-12-24T17:00:00.123Z.- Returns:
- The parsed date.
-
parseISODateTimeOptionalMillis
public static Date parseISODateTimeOptionalMillis(String p_str)
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.
-
-