public class XMLDateTime extends Object implements Cloneable, Comparable<XMLDateTime>
xml:dateTime
datatypes as specified
in W3C XML Schema Definition Language (XSD) 1.1 Part 2:
Datatypes.
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.Constructor and Description |
---|
XMLDateTime(String dateTimeString)
Creates a new XMLDateTime 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 lexical value, for example 1999-05-31T13:20:00-05:00.IllegalArgumentException
- if the supplied lexical value does not constitute a valid xsd:dateTime.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 © 2015-2020 Eclipse Foundation. All Rights Reserved.