|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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.XSDateTime
A representation of a date and time (and optional timezone)
Constructor Summary | |
XSDateTime()
Inititates a new representation of the current date and time |
|
XSDateTime(java.util.Calendar cal,
XDTDayTimeDuration tz)
Initiates a new represenation of a supplied date ant time |
Method Summary | |
java.util.Calendar |
calendar()
Retrieves the Calendar representation of the date stored |
java.lang.Object |
clone()
Creates a copy of this date and time representation |
ResultSequence |
constructor(ResultSequence arg)
Creates a new result sequence consisting of the retrievable date and time 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 and times (taking timezones into account) |
boolean |
gt(AnyType arg)
Comparison on this and the supplied dates and times (taking timezones into account) |
int |
hour()
Retrieve the hour from the date stored |
static boolean |
is_digit(char x)
Check to see if a character is numeric |
boolean |
lt(AnyType arg)
Comparison on this and the supplied dates and times (taking timezones into account) |
ResultSequence |
minus(ResultSequence arg)
Mathematical minus operator between this XSDateTime and a supplied result sequence (XSDateTime, XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
int |
minute()
Retrieve the minute from the date stored |
int |
month()
Retrieve the month from the date stored |
static java.lang.String |
pad_int(int num,
int len)
Pads the supplied number to the supplied number of digits by adding 0's in front of it |
static int[] |
parse_date(java.lang.String str)
Parses a String representation of a date and time and retrieves the year, month and day from it |
static double[] |
parse_time(java.lang.String str)
Parses a String representation of a date and time and retrieves the hour, minute and seconds from it |
static int[] |
parse_timezone(java.lang.String str)
Parses a String representation of a date and time and retrieves the timezone from it |
static XSDateTime |
parseDateTime(java.lang.String str)
Parses a String representation of a date and time and constructs a new XSDateTime object using that information |
ResultSequence |
plus(ResultSequence arg)
Mathematical addition operator between this XSDateTime and a supplied result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
double |
second()
Retrieve the seconds from the date stored |
java.lang.String |
string_type()
Retrive the datatype full pathname |
java.lang.String |
string_value()
Retrieves a String representation of the date and time stored |
boolean |
timezoned()
|
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 XSDateTime(java.util.Calendar cal, XDTDayTimeDuration tz)
cal
- The Calendar representation of the date and time to be storedtz
- The timezone of the date to be stored.public XSDateTime()
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public java.lang.String type_name()
type_name
in class CtrType
public static boolean is_digit(char x)
x
- Character to be tested
public static int[] parse_date(java.lang.String str)
str
- The String representation of the date (and optional timezone)
public static double[] parse_time(java.lang.String str)
str
- The String representation of the date (and optional timezone)
public static int[] parse_timezone(java.lang.String str)
str
- The String representation of the date (and optional timezone)
public static XSDateTime parseDateTime(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 and time value.
DynamicError
public int year()
public int month()
public int day()
public int hour()
public int minute()
public double second()
public boolean timezoned()
public static java.lang.String pad_int(int num, int len)
num
- Number that si to be padded (if neccessay)len
- Desired length after padding
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 boolean eq(AnyType arg) throws DynamicError
eq
in interface CmpEq
arg
- XSDateTime representation of the date to compare to
DynamicError
public boolean lt(AnyType arg) throws DynamicError
lt
in interface CmpLt
arg
- XSDateTime representation of the date to compare to
DynamicError
public boolean gt(AnyType arg) throws DynamicError
gt
in interface CmpGt
arg
- XSDateTime representation of the date to compare to
DynamicError
public XDTDayTimeDuration tz()
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 XSDateTime, 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 XSDateTime 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 XSDateTime 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 |