public final class ChimeraDate extends Timestamp implements IDateTimeValueHolder
java.sql.Timestamp
and as a IDateTimeValueHolder
.
Note: Use this class sparingly, and for scripting purposes only.
Constructor and Description |
---|
ChimeraDate(Date p_dt) |
ChimeraDate(long p_lTime) |
ChimeraDate(Timestamp p_ts) |
Modifier and Type | Method and Description |
---|---|
ChimeraDate |
asDate()
Get the current date, i.e. the instance in time with its
UTC time part set to zero.
|
ChimeraDate |
asDate(String p_strTimeZone)
Get the current date, i.e. the instance in time with its
time part set to zero in the given time zone.
|
ChimeraDate |
asDate(TimeZone p_tz)
Get the current date, i.e. the instance in time with its
time part set to zero in the given time zone.
|
ChimeraDate |
asTime()
Get the current time, i.e. the instance in time with its
date set to zero 1970-01-01 in the UTC time zone.
|
String |
getCanonicalLexicalRepresentation()
Get the canonical lexical representation of this value
according to it's datatype.
|
Object |
getRawValue()
Get the raw data that this value holder holds.
|
QName |
getType()
The type of data this value holder holds.
|
Date |
getValue()
Get the data that this value holder holds.
|
ChimeraDate |
getWithoutFractionalSeconds()
Discard the fractional seconds using the UTC time zone.
|
ChimeraDate |
getWithoutFractionalSeconds(String p_strTimeZone)
Discard the fractional seconds.
|
ChimeraDate |
getWithoutFractionalSeconds(TimeZone p_tz)
Discard the fractional seconds.
|
boolean |
hasValue()
Check if this value holder currently holds data or not.
|
after, before, compareTo, compareTo, equals, equals, from, getNanos, getTime, hashCode, setNanos, setTime, toInstant, toLocalDateTime, toString, valueOf, valueOf
after, before, clone, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC
public ChimeraDate(long p_lTime)
public ChimeraDate(Date p_dt)
public ChimeraDate(Timestamp p_ts)
public QName getType()
IValueHolder
getType
in interface IValueHolder<Date>
IxDatatype.DATETIME
.public Date getValue()
IValueHolder
Implementations MUST ensure that multiple calls to this method will return values that equal each other.
getValue
in interface IValueHolder<Date>
public Object getRawValue()
IValueHolder
getRawValue
in interface IValueHolder<Date>
public boolean hasValue()
IValueHolder
hasValue
in interface IValueHolder<Date>
true
if the data holder holds data,
or false
otherwise.public String getCanonicalLexicalRepresentation()
IValueHolder
getCanonicalLexicalRepresentation
in interface IValueHolder<Date>
Convert.getCanonicalLexicalRepresentationDateTime(Date)
public ChimeraDate getWithoutFractionalSeconds()
public ChimeraDate getWithoutFractionalSeconds(String p_strTimeZone)
p_strTimeZone
- The time zone to be used.public ChimeraDate getWithoutFractionalSeconds(TimeZone p_tz)
p_tz
- The time zone to be used.public ChimeraDate asDate()
public ChimeraDate asDate(String p_strTimeZone)
p_strTimeZone
- The time zone to be used.public ChimeraDate asDate(TimeZone p_tz)
p_tz
- The time zone to be used.public ChimeraDate asTime()