public class XMLDateTimeFormatter extends java.lang.Object implements ValueFormatter<java.util.Date>
Date object so that it is represented as an XML dataTime.| Modifier and Type | Field and Description |
|---|---|
static XMLDateTimeFormatter |
FORMATTER
Useful static instance of this object to be used when one doesn't want to
generate lots of formatters when one will suffice
|
| Constructor and Description |
|---|
XMLDateTimeFormatter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(java.util.Date date)
Formats the date using Java's
Calendar to extract years, months etc
from a date object. |
java.lang.Class<java.util.Date> |
getType()
Returns the
Class all objects acceptable as input to the format method must be
assignable to. |
public static final XMLDateTimeFormatter FORMATTER
public java.lang.String format(java.util.Date date)
Calendar to extract years, months etc
from a date object. An XMLGregorianCalendar is packed with this
information and it's formatting method is used to generate the outputformat in interface ValueFormatter<java.util.Date>date - The object to formatCalendar,
XMLGregorianCalendar.toXMLFormat(),
ValueFormatter.format(java.lang.Object)public java.lang.Class<java.util.Date> getType()
ValueFormatterClass all objects acceptable as input to the format method must be
assignable to.getType in interface ValueFormatter<java.util.Date>ValueFormatter