|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ucl.xpath.types.AnyType
org.ucl.xpath.types.AnySimpleType
org.ucl.xpath.types.AnyAtomicType
org.ucl.xpath.types.CtrType
org.ucl.xpath.types.CalendarType
org.ucl.xpath.types.XSDate
Representation of a date of the form year-month-day and optional timezone
Constructor Summary | |
XSDate()
Initialises a new representation of the current date |
|
XSDate(java.util.Calendar cal,
XDTDayTimeDuration tz)
Initialises a new represenation of a supplied date |
Method Summary | |
java.util.Calendar |
calendar()
Retrieves the Calendar representation of the date stored |
java.lang.Object |
clone()
Creates a copy of this date representation |
ResultSequence |
constructor(ResultSequence arg)
Creates a new result sequence consisting of the retrievable date value in the supplied result sequence |
int |
day()
Retrieve the day from the date stored |
boolean |
eq(AnyType arg)
Equality comparison on this and the supplied dates (taking timezones into account) |
boolean |
gt(AnyType arg)
Comparison on this and the supplied dates (taking timezones into account) |
boolean |
lt(AnyType arg)
Comparison on this and the supplied dates (taking timezones into account) |
ResultSequence |
minus(ResultSequence arg)
Mathematical minus operator between this XSDate and a supplied result sequence (XSDate, XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
int |
month()
Retrieve the month from the date stored |
static XSDate |
parse_date(java.lang.String str)
Parses a String representation of a date (of the form year-month-day or year-month-day+timezone) and constructs a new XSDate representation of it. |
ResultSequence |
plus(ResultSequence arg)
Mathematical addition operator between this XSDate and a supplied result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
java.lang.String |
string_type()
Retrive the datatype full pathname |
java.lang.String |
string_value()
Retrieves a String representation of the date stored |
boolean |
timezoned()
Retrieves whether this date has an optional timezone associated with it |
java.lang.String |
type_name()
Retrieves the datatype name |
XDTDayTimeDuration |
tz()
Retrieves the timezone associated with the date stored |
double |
value()
Currently unsupported method. |
int |
year()
Retrieve the year from the date stored |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XSDate(java.util.Calendar cal, XDTDayTimeDuration tz)
cal
- The Calendar representation of the date to be storedtz
- The timezone of the date to be stored.public XSDate()
Method Detail |
public java.lang.String type_name()
type_name
in class CtrType
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public static XSDate parse_date(java.lang.String str)
str
- The String representation of the date (and optional timezone)
public ResultSequence constructor(ResultSequence arg) throws DynamicError
constructor
in class CtrType
arg
- The result sequence from which to extract the date value.
DynamicError
public int year()
public int month()
public int day()
public boolean timezoned()
public java.lang.String string_value()
string_value
in class AnyType
public java.lang.String string_type()
string_type
in class AnyType
public java.util.Calendar calendar()
public XDTDayTimeDuration tz()
public boolean eq(AnyType arg) throws DynamicError
eq
in interface CmpEq
arg
- XSDate representation of the date to compare to
DynamicError
public boolean lt(AnyType arg) throws DynamicError
lt
in interface CmpLt
arg
- XSDate representation of the date to compare to
DynamicError
public boolean gt(AnyType arg) throws DynamicError
gt
in interface CmpGt
arg
- XSDate representation of the date to compare to
DynamicError
public double value()
public ResultSequence minus(ResultSequence arg) throws DynamicError
minus
in interface MathMinus
arg
- The supplied ResultSequence that is on the right of the minus operator. If this is an XSDate, the result will be a
XDTDayTimeDuration of the duration of time between these two dates. If arg is an XDTYearMonthDuration or an XDTDayTimeDuration
the result will be a XSDate of the result of the current date minus the duration of time supplied.
DynamicError
- Dynamic error.public ResultSequence plus(ResultSequence arg) throws DynamicError
plus
in interface MathPlus
arg
- The supplied ResultSequence that is on the right of the minus operator. If arg is an XDTYearMonthDuration or an XDTDayTimeDuration
the result will be a XSDate of the result of the current date minus the duration of time supplied.
DynamicError
- Dynamic error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |