Interface DateValued

    • Method Detail

      • asDate

        @Deprecated
        Date asDate()
        Deprecated.
        since 6.1; use asCalendarDate() instead to obtain an object representation of the contained value.
        Gets the contained date value as a java.sql.Date relative to the default time zone. The time zone used by TimeZone.getDefault() is used.
        Returns:
        the contained value as a java.sql.Date. If null valued, as indicated by TokenValued.isNull(), null is returned.
      • asDate

        @Deprecated
        Date asDate​(TimeZone tz)
        Deprecated.
        since 6.1; use asCalendarDate() instead to obtain an object representation of the contained value.
        Gets the contained date value as a java.sql.Date relative to the given time zone.
        Parameters:
        tz - the time zone in which to interpret the date
        Returns:
        the contained value as a java.sql.Date. If null valued, as indicated by TokenValued.isNull(), null is returned.
      • asEpochDays

        long asEpochDays()
        Gets the contained date value as the number of days since Java epoch (January 1, 1970).
        Returns:
        the contained value as days since Java epoch. If null valued, as indicated by TokenValued.isNull(), 0 is returned.
      • asCalendarDate

        CalendarDate asCalendarDate()
        Gets the contained date value. This value represents the timezone free date portion of a timestamp.
        Returns:
        the contained value as a calendar date. If null valued, as indicated by TokenValued.isNull(), null is returned.