Package org.eclipse.wst.xml.xpath2.processor.internal.types
public class XSDateTime extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarTypeA representation of a date and time (and optional timezone)
Constructor Summary |
XSDateTime(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz) |
XSDateTime() |
Method Summary | |
public java.util.Calendar | calendar()Retrieves the Calendar representation of the date stored |
public java.lang.Object | clone()Creates a copy of this date and time representation |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)Creates a new result sequence consisting of the retrievable date and time value in the supplied result sequence |
public int | day()Retrieve the day from the date stored |
public boolean | eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)Equality comparison on this and the supplied dates and times (taking timezones into account) |
public java.lang.String | getStringValue()Retrieves a String representation of the date and time stored |
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition | getTypeDefinition() |
public boolean | gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)Comparison on this and the supplied dates and times (taking timezones into account) |
public int | hour()Retrieve the hour from the date stored |
public static boolean | is_digit(char x)Check to see if a character is numeric |
public boolean | lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)Comparison on this and the supplied dates and times (taking timezones into account) |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)Mathematical minus operator between this XSDateTime and a supplied result sequence (XSDateTime, XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
public int | minute()Retrieve the minute from the date stored |
public int | month()Retrieve the month from the date stored |
public 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 |
public 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 |
public 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 |
public static int[] | parse_timezone(java.lang.String str)Parses a String representation of a date and time and retrieves the timezone from it |
public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime | parseDateTime(java.lang.String str)Parses a String representation of a date and time and constructs a new XSDateTime object using that information |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)Mathematical addition operator between this XSDateTime and a supplied result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
public double | second()Retrieve the seconds from the date stored |
public java.lang.String | string_type()Retrive the datatype full pathname |
public boolean | timezoned() |
public java.lang.String | type_name()Retrieves the datatype name |
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration | tz()Retrieves the timezone associated with the date stored |
public double | value()Currently unsupported method. Retrieves the date in milliseconds since the begining of epoch |
public int | year()Retrieve the year from the date stored |
Constructor Detail |
public XSDateTime(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)
Initiates a new representation of a supplied date and time
public XSDateTime()
Inititates a new representation of the current date and time
Methods Detail |
public java.util.Calendar calendar()
Retrieves the Calendar representation of the date stored
java.util.Calendar - Calendar representation of the date stored
public java.lang.Object clone()
Creates a copy of this date and time representation
java.lang.Object - A copy of this date and time representation
java.lang.CloneNotSupportedException
public org.eclipse.wst.xml.xpath2.api.ResultSequence constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Creates a new result sequence consisting of the retrievable date and time value in the supplied result sequence
arg - The result sequence from which to extract the date and time value.
org.eclipse.wst.xml.xpath2.api.ResultSequence - A new result sequence consisting of the date and time value supplied.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int day()
Retrieve the day from the date stored
int - the day value of the date stored
public boolean eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)
Equality comparison on this and the supplied dates and times (taking timezones into account)
arg - XSDateTime representation of the date to compare to
dynamicContext
boolean - True if the two dates and times are represent the same exact point in time. False otherwise.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.String getStringValue()
Retrieves a String representation of the date and time stored
java.lang.String - String representation of the date and time stored
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getTypeDefinition()
org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition
public boolean gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison on this and the supplied dates and times (taking timezones into account)
arg - XSDateTime representation of the date to compare to
context
boolean - True if in time, this date and time lies after the date and time supplied. False otherwise.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int hour()
Retrieve the hour from the date stored
int - the hour value of the date stored
public boolean is_digit(char x)
Check to see if a character is numeric
x - Character to be tested
boolean - True if the character is numeric. False otherwise.
public boolean lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison on this and the supplied dates and times (taking timezones into account)
arg - XSDateTime representation of the date to compare to
context
boolean - True if in time, this date and time lies before the date and time supplied. False otherwise.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical minus operator between this XSDateTime and a supplied result sequence (XSDateTime, XDTYearMonthDuration and XDTDayTimeDuration are only valid ones).
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.
org.eclipse.wst.xml.xpath2.api.ResultSequence - New ResultSequence consisting of the result of the mathematical minus operation.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int minute()
Retrieve the minute from the date stored
int - the minute value of the date stored
public int month()
Retrieve the month from the date stored
int - the month value of the date stored
public 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
num - Number that si to be padded (if neccessay)
len - Desired length after padding
java.lang.String - String representation of the padded integer
public 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
str - The String representation of the date (and optional timezone)
int[] - Integer array of size 3. Element 1 is the year, element 2 is the month and element 3 is the day
public 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
str - The String representation of the date (and optional timezone)
double[] - Integer array of size 3. Element 1 is the hour, element 2 is the minute and element 3 is the seconds
public int[] parse_timezone(java.lang.String str)
Parses a String representation of a date and time and retrieves the timezone from it
str - The String representation of the date (and optional timezone)
int[] - Integer array of size 3. Element 1 represents whether the timezone is ahead or behind GMT, element 2 is the hour displacement and element 3 is the minute displacement.
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime parseDateTime(java.lang.String str)
Parses a String representation of a date and time and constructs a new XSDateTime object using that information
str - The String representation of the date (and optional timezone)
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime - The XSDateTime representation of the date and time (and optional timezone)
public org.eclipse.wst.xml.xpath2.api.ResultSequence plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical addition operator between this XSDateTime and a supplied result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid ones).
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.
org.eclipse.wst.xml.xpath2.api.ResultSequence - New ResultSequence consisting of the result of the mathematical minus operation.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public double second()
Retrieve the seconds from the date stored
double - the seconds value of the date stored
public java.lang.String string_type()
Retrive the datatype full pathname
java.lang.String - "xs:dateTime" which is the datatype full pathname
public boolean timezoned()
boolean
public java.lang.String type_name()
Retrieves the datatype name
java.lang.String - "dateTime" which is the dataype name
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz()
Retrieves the timezone associated with the date stored
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration - the timezone associated with the date stored
public double value()
Currently unsupported method. Retrieves the date in milliseconds since the begining of epoch
double - Number of milliseconds since the begining of the epoch
public int year()
Retrieve the year from the date stored
int - the year value of the date stored