FileDocCategorySizeDatePackage
XSDateTime.javaAPI DocApache Xerces 3.0.16493Fri Sep 14 20:33:56 BST 2007org.apache.xerces.xs.datatypes

XSDateTime

public interface XSDateTime

Interface to expose the values for all date-time related types. The following table shows the methods defined for various XML Schema 1.0 built-in types. 'X' marks whether a particular method is defined for a particular type. Accessing undefined methods may return unexpected values.
XML Schema Datatype getYears() getMonths() getDays() getHours() getMinutes() getSeconds() getTimeZoneHours() getTimeZoneMinutes() getXMLGregorianCalendar() getDuration() hasTimeZone() normalize() isNormalized() getLexicalValue()
gYear X - - - - - X X X - X X X X
gMonth - X - - - - X X X - X X X X
gDay - - X - - - X X X - X X X X
gYearMonth X X - - - - X X X - X X X X
gMonthDay - X X - - - X X X - X X X X
date X X X - - - X X X - X X X X
time - - - X X X X X X - X X X X
datetime X X X X X X X X X - X X X X
duration - X - - - X - - - X - - - X

author
Ankit Pasricha, IBM
version
$Id: XSDateTime.java 447250 2006-09-18 05:27:17Z mrglavas $

Fields Summary
Constructors Summary
Methods Summary
public intgetDays()

return
days - cannot be negative;

public javax.xml.datatype.DurationgetDuration()

return
a Duration (if applicable otherwise null)

public intgetHours()

return
hours - cannot be negative;

public java.lang.StringgetLexicalValue()

return
the original lexical value

public intgetMinutes()

return
minutes - cannot be negative;

public intgetMonths()

return
months - can be negative only for duration types; For duration types, it returns years*12 + months

public doublegetSeconds()

return
seconds - can be negative only for durations; For duration types, it returns days*24*3600 + hours*3600 + minutes*60 + seconds

public intgetTimeZoneHours()

return
timezone hours (for GMT-xx:xx this will be negative),

public intgetTimeZoneMinutes()

return
timezone minutes (for GMT-xx:xx this will be negative),

public javax.xml.datatype.XMLGregorianCalendargetXMLGregorianCalendar()

return
an un-normalized XMLGregorianCalendar (if applicable otherwise null)

public intgetYears()

return
years - can be negative for date-time related types;

public booleanhasTimeZone()

return
boolean (true when timezone is specified in the original lexical value)

public booleanisNormalized()

return
whether a date-time related object is normalized or not (value is not useful for types where timezone is not specified)

public org.apache.xerces.xs.datatypes.XSDateTimenormalize()

return
a new date-time related object with normalized values (has no effect on objects already normalized)