Class ContentDateParserCalendar
java.lang.Object
com.oracle.content.sdk.model.date.ContentDateParser
com.oracle.content.sdk.model.date.ContentDateParserCalendar
This implementation of
ContentDateParser uses theCalendar methods for parsing a ContentDate
and is compatible with older Java (7) and Android versions less than 26. Included for legacy puproses-
Method Summary
Modifier and TypeMethodDescriptionParse the server string value and return as a "Date" 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
-
getAsDate
Parse the server string value and return as a "Date" object.- Returns:
- ZonedDate object if value or null
-
getTimeInMilliseconds
Parse the server string value and return the number of milliseconds since "epoch".- Specified by:
getTimeInMillisecondsin 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:
getDisplayStringin classContentDateParser- Parameters:
displayType- Format to useoutputPattern- Use a custom output format (e.g. "M/d/yyyy" or "MMMMM d, yyyy")- Returns:
- Display value or ""
-