- All Superinterfaces:
ScalarTyped,ScalarValued,TokenTyped,TokenValued
- All Known Subinterfaces:
DateInputField,DateValuedIterator
- All Known Implementing Classes:
DateRegister,DateToken,DateTokenConverter,NullToken
A
TokenValued object containing a date value.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets the contained date value.asDate()Deprecated.Deprecated.since 6.1; useasCalendarDate()instead to obtain an object representation of the contained value.longGets the contained date value as the number of days since Java epoch (January 1, 1970).Methods inherited from interface com.pervasive.datarush.tokens.scalar.ScalarValued
getType, isZeroMethods inherited from interface com.pervasive.datarush.tokens.TokenValued
isNull
-
Method Details
-
asDate
Deprecated.since 6.1; useasCalendarDate()instead to obtain an object representation of the contained value.Gets the contained date value as ajava.sql.Daterelative to the default time zone. The time zone id used by {@link ZoneId.systemDefault()} is used.- Returns:
- the contained value as a
java.sql.Date. If null valued, as indicated byTokenValued.isNull(),nullis returned.
-
asDate
Deprecated.since 6.1; useasCalendarDate()instead to obtain an object representation of the contained value.Gets the contained date value as ajava.sql.Daterelative to the given time zone.- Parameters:
zoneId- the time zone id in which to interpret the date- Returns:
- the contained value as a
java.sql.Date. If null valued, as indicated byTokenValued.isNull(),nullis 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(),0is 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(),nullis returned.
-
asCalendarDate()instead to obtain an object representation of the contained value.