Class ContentDateParserZonedDateTime
java.lang.Object
com.oracle.content.sdk.model.date.ContentDateParser
com.oracle.content.sdk.model.date.ContentDateParserZonedDateTime
This implementation of
ContentDateParser
uses the newer Java 8/Android API 26+
date/time methods based around ZonedDateTime and is preferred if your minimum Android API is 26+.-
Method Summary
Modifier and TypeMethodDescriptionParse the server string value and return as a "ZonedDateTime" object.getDisplayString
(ContentDateDisplayType displayType, String outputPattern) Return a formatted display string by parsing the date values and formatting according to the DisplayType.Parse the server string value and return the number of milliseconds since "epoch".Methods inherited from class com.oracle.content.sdk.model.date.ContentDateParser
getDisplayString
-
Method Details
-
getAsZonedDateTime
Parse the server string value and return as a "ZonedDateTime" object.- Returns:
- ZonedDate object if value or null
-
getTimeInMilliseconds
Parse the server string value and return the number of milliseconds since "epoch".- Specified by:
getTimeInMilliseconds
in classContentDateParser
- Returns:
- Time im milliseconds or null for parsing error
-
getDisplayString
Return a formatted display string by parsing the date values and formatting according to the DisplayType.- Specified by:
getDisplayString
in classContentDateParser
- Parameters:
displayType
- Format to useoutputPattern
- Use a custom output format (e.g. "M/d/yyyy" or "MMMMM d, yyyy")- Returns:
- Display value or ""
-