public class XMLDateTime extends Object implements Cloneable, Comparable<XMLDateTime>
xml:dateTime
datatypes as specified in W3C, XML Schema Part 2:
Datatypes Second Edition Known deviations from the standard: - the range
of years in this implementation is limited to Integer.MIN_VALUE to
Integer.MAX_VALUE for practical reasons - this implementation accepts some
dates that have impossible month, day-of-month combinations (such as
2005-02-29, which was not a leap year)Constructor and Description |
---|
XMLDateTime(String dateTimeString)
Creates a new DateTime object for the supplied xsd:dateTime string value.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
int |
compareTo(XMLDateTime otherDT)
Compares this DateTime object to another DateTime object.
|
boolean |
isNormalized()
Checks whether this object has already been normalized.
|
void |
normalize()
Normalizes this dateTime object.
|
String |
toString()
Returns the xsd:dateTime string-representation of this object.
|
public XMLDateTime(String dateTimeString)
dateTimeString
- An xsd:dateTime value, for example
1999-05-31T13:20:00-05:00.public boolean isNormalized()
public void normalize()
public String toString()
public int compareTo(XMLDateTime otherDT)
compareTo
in interface Comparable<XMLDateTime>
ClassCastException
- If other is not a DateTime object.Copyright © 2001-2016 Aduna. All Rights Reserved.