Class ContentDateParser

java.lang.Object
com.oracle.content.sdk.model.date.ContentDateParser
Direct Known Subclasses:
ContentDateParserCalendar, ContentDateParserZonedDateTime

public abstract class ContentDateParser extends Object
Get an object for this interface by calling ContentDate.getDateParser()
  • Constructor Details

    • ContentDateParser

      public ContentDateParser()
  • Method Details

    • getDisplayString

      public 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.
      Parameters:
      displayType - Format to use
      outputFormat - Use a custom output format (e.g. "M/d/yyyy" or "MMMMM d, yyyy")
      Returns:
      Display value or ""
    • getDisplayString

      public String getDisplayString(ContentDateDisplayType displayType)
      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

      public abstract Long getTimeInMilliseconds()
      Parse the server string value and return the number of milliseconds since "epoch".
      Returns:
      Time im milliseconds or null for parsing error