-
- All Superinterfaces:
ScalarTyped
,ScalarValued
,TokenTyped
,TokenValued
- All Known Subinterfaces:
DateInputField
,DateValuedIterator
- All Known Implementing Classes:
DateRegister
,DateToken
,DateTokenConverter
,NullToken
public interface DateValued extends ScalarValued
ATokenValued
object containing a date value.- See Also:
TokenTypeConstant#DATE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CalendarDate
asCalendarDate()
Gets the contained date value.Date
asDate()
Deprecated.since 6.1; useasCalendarDate()
instead to obtain an object representation of the contained value.Date
asDate(TimeZone tz)
Deprecated.since 6.1; useasCalendarDate()
instead to obtain an object representation of the contained value.long
asEpochDays()
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.Date
relative 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()
,null
is 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.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 byTokenValued.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.
-
-