Class ContentDateParserZonedDateTime

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

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

    • getAsZonedDateTime

      public ZonedDateTime getAsZonedDateTime()
      Parse the server string value and return as a "ZonedDateTime" 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 ""