-
- All Superinterfaces:
ScalarTyped,ScalarValued,TokenTyped,TokenValued
- All Known Subinterfaces:
DateInputField,DateValuedIterator
- All Known Implementing Classes:
DateRegister,DateToken,DateTokenConverter,NullToken
public interface DateValued extends ScalarValued
ATokenValuedobject containing a date value.- See Also:
TokenTypeConstant#DATE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CalendarDateasCalendarDate()Gets the contained date value.DateasDate()Deprecated.since 6.1; useasCalendarDate()instead to obtain an object representation of the contained value.DateasDate(TimeZone tz)Deprecated.since 6.1; useasCalendarDate()instead to obtain an object representation of the contained value.longasEpochDays()Gets 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, isZero
-
Methods inherited from interface com.pervasive.datarush.tokens.TokenValued
isNull
-
-
-
-
Method Detail
-
asDate
@Deprecated Date 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 used byTimeZone.getDefault()is used.- Returns:
- the contained value as a
java.sql.Date. If null valued, as indicated byTokenValued.isNull(),nullis returned.
-
asDate
@Deprecated Date asDate(TimeZone tz)
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:
tz- the time zone 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.
-
-