public class DateTime extends AbstractXJdfType<java.lang.String,DateTime>
| Constructor and Description |
|---|
DateTime()
Default constructor.
|
DateTime(java.util.Date date)
Creates a XJDF DateTime instance by a Date object.
|
DateTime(int year,
int month,
int day)
Custom constructor.
|
DateTime(int year,
int month,
int day,
int hour,
int minute)
Custom constructor.
|
DateTime(int year,
int month,
int day,
int hour,
int minute,
int second)
Custom constructor.
|
DateTime(java.lang.String dateTime)
Creates a XJDF DateTime instance by a String expression object.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Calendar |
getCalendar()
Clones the underlying calendar and returns it.
|
java.lang.String |
marshal(DateTime dateTime) |
java.lang.String |
toString() |
java.lang.String |
toString(java.util.TimeZone timeZone)
Formats this DateTime object using the passed time zone.
|
DateTime |
unmarshal(java.lang.String dateTime) |
equals, hashCodepublic DateTime()
public DateTime(int year,
int month,
int day)
year - The value used to set the YEAR.month - The value used to set the MONTH in year. January is "0".day - The value used to set the DAY in month.public DateTime(int year,
int month,
int day,
int hour,
int minute)
year - The value used to set the YEAR.month - The value used to set the MONTH in year. January is "0".day - The value used to set the DAY in month.hour - The value used to set the HOUR of day.minute - The value used to set the MINUTE in of.public DateTime(int year,
int month,
int day,
int hour,
int minute,
int second)
year - The value used to set the YEAR.month - The value used to set the MONTH in year. January is "0".day - The value used to set the DAY in month.hour - The value used to set the HOUR of day.minute - The value used to set the MINUTE.second - The value used to set the SECOND.public DateTime(java.lang.String dateTime)
throws java.text.ParseException
dateTime - XJDF DateTime String expression. Should match the format yyyy-MM-dd'T'HH:mm:ss'Z'.java.text.ParseException - if the passed expressionpublic DateTime(java.util.Date date)
date - Date object.public final java.util.Calendar getCalendar()
public final java.lang.String marshal(DateTime dateTime)
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,DateTime>XmlAdapter.marshal(java.lang.Object)public final DateTime unmarshal(java.lang.String dateTime) throws java.lang.Exception
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,DateTime>java.lang.ExceptionXmlAdapter.unmarshal(java.lang.Object)public final java.lang.String toString()
toString in class AbstractXJdfType<java.lang.String,DateTime>Object.toString()public final java.lang.String toString(java.util.TimeZone timeZone)
timeZone - The time zone to use.