Class ContentDateParser
java.lang.Object
com.oracle.content.sdk.model.date.ContentDateParser
- Direct Known Subclasses:
ContentDateParserCalendar
,ContentDateParserZonedDateTime
Get an object for this interface by calling
ContentDate.getDateParser()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayString
(ContentDateDisplayType displayType) Return a formatted display string by parsing the date values and formatting according to the DisplayType, using the default output pattern.abstract String
getDisplayString
(ContentDateDisplayType displayType, String outputFormat) Return a formatted display string by parsing the date values and formatting according to the DisplayType, specifying the output format.abstract Long
Parse the server string value and return the number of milliseconds since "epoch".
-
Constructor Details
-
ContentDateParser
public ContentDateParser()
-
-
Method Details
-
getDisplayString
Return a formatted display string by parsing the date values and formatting according to the DisplayType, specifying the output format.- Parameters:
displayType
- Format to useoutputFormat
- Use a custom output format (e.g. "M/d/yyyy" or "MMMMM d, yyyy")- Returns:
- Display value or ""
-
getDisplayString
Return a formatted display string by parsing the date values and formatting according to the DisplayType, using the default output pattern.- Parameters:
displayType
- Format to use- Returns:
- Display value or ""
-
getTimeInMilliseconds
Parse the server string value and return the number of milliseconds since "epoch".- Returns:
- Time im milliseconds or null for parsing error
-