Date Time Datetime and Datetimetz (XMLGregorianCalendar) Methods

Type Method Date Time Date Time Date Timetz gDay gMonth gMonthDay gYear gYear Month
void add(Duration duration)

Add duration to this instance.

Y Y Y Y Y Y Y Y Y
void clear()

Unset all fields to undefined.

Y Y Y Y Y Y Y Y Y
int compare(XMLGregorianCalendar xmlGregorianCalendar)

Compare two instances of XMLGregorianCalendar

Y Y Y Y n/a n/a n/a n/a n/a
boolean equals(Object obj)

Indicates whether parameter obj is equal to this one.

Y Y Y Y Y Y Y Y Y
int getDay()

Return day in month or DatatypeConstants.FIELD_UNDEFINED.

Y n/a Y Y Y n/a Y Y n/a
BigDecimal getFractionalSecond()

Return fractional seconds.

n/a Y Y Y n/a n/a n/a n/a n/a
int getHour()

Return hours or DatatypeConstants.FIELD_UNDEFINED.

n/a Y Y Y n/a n/a n/a n/a n/a
int getMillisecond()

Return millisecond precision of getFractionalSecond()

n/a Y Y Y n/a n/a n/a n/a n/a
int getMinute()

Return minutes or DatatypeConstants.FIELD_UNDEFINED.

n/a Y Y Y n/a n/a n/a n/a n/a
int getMonth()

Return number of month or DatatypeConstants.FIELD_UNDEFINED.

Y n/a Y Y n/a Y Y n/a Y
int getSecond()

Return seconds or DatatypeConstants.FIELD_UNDEFINED.

n/a Y Y Y n/a n/a n/a n/a n/a
int getTimezone()

Return timezone offset in minutes or DatatypeConstants.FIELD_UNDEFINED if this optional field is not defined.

n/a n/a Y Y n/a n/a n/a n/a n/a
int getYear()

Return low order component for XML Schema 1.0 dateTime datatype field for year or DatatypeConstants.FIELD_UNDEFINED.

Y n/a Y Y n/a n/a n/a Y Y
void setDay(int day)

Set days in month.

Y n/a Y Y Y n/a Y n/a n/a
void setFractionalSecond(BigDecimal fractional)

Set fractional seconds.

n/a Y Y Y n/a n/a n/a n/a n/a
void setHour(int hour)

Set hours.

n/a Y Y Y n/a n/a n/a n/a n/a
void setMillisecond(int millisecond)

Set milliseconds.

n/a Y Y Y n/a n/a n/a n/a n/a
void setMinute(int minute)

Set minutes.

n/a Y Y Y n/a n/a n/a n/a n/a
void setMonth(int month)

Set month.

Y n/a Y Y n/a Y Y n/a Y
void setSecond(int second)

Set seconds.

n/a Y Y Y n/a n/a n/a n/a n/a
void setTime(int hour, int minute, int second)

Set time as one unit.

n/a Y Y Y n/a n/a n/a n/a n/a
void setTime(int hour, int minute, int second, BigDecimal fractional)

Set time as one unit, including the optional infinite precision fractional seconds.

n/a Y Y Y n/a n/a n/a n/a n/a
void setTime(int hour, int minute, int second, int millisecond)

Set time as one unit, including optional milliseconds.

This method should not be used in scripts where the time field has been set before the script. In this case it is best to use two separate calls to set the hour, minute, second, and millisecond fields as:

setTime(int hour, int minute, int second)

setMillisecond(int millisecond)

n/a Y Y Y n/a n/a n/a n/a n/a
void setTimezone(int offset)

Set the number of minutes in the timezone offset.

n/a n/a Y Y n/a n/a n/a n/a n/a
void setYear(BigInteger year)

Set low and high order component of XSD dateTime year field.

Y n/a Y Y n/a n/a n/a Y Y
void setYear(int year)

Set year of XSD dateTime year field.

This method should not be used in scripts where the date field has been set before the script. In this case it is best to use setYear(BigInteger year) instead.

Y n/a Y Y n/a n/a n/a Y Y
String toXMLFormat()

Return the lexical representation of this instance.

Y Y Y Y Y Y Y Y Y