Class ContentDate

java.lang.Object
com.oracle.content.sdk.model.AssetObject
com.oracle.content.sdk.model.date.ContentDate
All Implemented Interfaces:
Serializable

public class ContentDate extends AssetObject
Represents content date as represented by the SDK. Use ContentDateParser to parse the string values.
See Also:
  • Field Details

    • DEFAULT_TIMEZONE

      public static String DEFAULT_TIMEZONE
  • Constructor Details

    • ContentDate

      public ContentDate(String value, String timezone, String description)
      Create Content Date field.
      Parameters:
      value - Date/time string (e.g. "2018-08-21T19:09:47.106")
      timezone - Timezone, can be null which will default to "UTC"
      description - Optional description (can be null)
  • Method Details

    • getValue

      public String getValue()
      Get raw string value of the date Use ContentDateParser to parse the value.
      Returns:
      string value of date.
    • getTimezone

      public String getTimezone()
      Get raw timezone string
      Returns:
      timezone string
    • getDescription

      public String getDescription()
      Get description field for date.
      Returns:
      date description
    • getDateParser

      public ContentDateParser getDateParser()
      Gets the default date parser using ZonedDateTime available in Android API 26+. If older OS support is needed, use getLegacyDateParser()
      Returns:
      ContentDateParser to parse and display dates
    • getLegacyDateParser

      public ContentDateParser getLegacyDateParser()
      Gets a date parser compatible with older OS versions (less than API 26).
      Returns:
      ContentDateParser to parse and display dates