Class ContentDateParserCalendar

java.lang.Object
com.oracle.content.sdk.model.date.ContentDateParser
com.oracle.content.sdk.model.date.ContentDateParserCalendar

public class ContentDateParserCalendar extends ContentDateParser
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 Details

    • getAsDate

      public Date getAsDate()
      Parse the server string value and return as a "Date" object.
      Returns:
      ZonedDate object if value or null
    • getTimeInMilliseconds

      public Long getTimeInMilliseconds()
      Parse the server string value and return the number of milliseconds since "epoch".
      Specified by:
      getTimeInMilliseconds in class ContentDateParser
      Returns:
      Time im milliseconds or null for parsing error
    • getDisplayString

      public String getDisplayString(ContentDateDisplayType displayType, String outputPattern)
      Return a formatted display string by parsing the date values and formatting according to the DisplayType.
      Specified by:
      getDisplayString in class ContentDateParser
      Parameters:
      displayType - Format to use
      outputPattern - Use a custom output format (e.g. "M/d/yyyy" or "MMMMM d, yyyy")
      Returns:
      Display value or ""