public class DateTime extends AbstractXJdfType<String,DateTime>
| Constructor and Description |
|---|
DateTime()
Default constructor.
|
DateTime(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(String dateTime)
Creates a XJDF DateTime instance by a String expression object.
|
| Modifier and Type | Method and Description |
|---|---|
Calendar |
getCalendar()
Clones the underlying calendar and returns it.
|
String |
marshal(DateTime dateTime) |
String |
toString() |
String |
toString(TimeZone timeZone)
Formats this DateTime object using the passed time zone.
|
DateTime |
unmarshal(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(String dateTime) throws ParseException
dateTime - XJDF DateTime String expression. Should match the format yyyy-MM-dd'T'HH:mm:ss'Z'.ParseException - if the passed expressionpublic DateTime(Date date)
date - Date object.public final Calendar getCalendar()
public final String marshal(DateTime dateTime)
marshal in class XmlAdapter<String,DateTime>XmlAdapter.marshal(java.lang.Object)public final DateTime unmarshal(String dateTime) throws Exception
unmarshal in class XmlAdapter<String,DateTime>ExceptionXmlAdapter.unmarshal(java.lang.Object)public final String toString()
toString in class AbstractXJdfType<String,DateTime>Object.toString()Copyright © 2016. All rights reserved.