public abstract class JodaConvert
extends java.lang.Object
Constructor and Description |
---|
JodaConvert() |
Modifier and Type | Method and Description |
---|---|
protected static DateMidnight |
deserializeDateMidnight(java.lang.String text,
DateTimeZone zone)
Deserialize date value as a midnight date in the specified time zone.
|
static LocalDate |
deserializeLocalDate(java.lang.String text)
Deserialize date value from text as local date without time zone.
|
static DateMidnight |
deserializeLocalDateMidnight(java.lang.String text)
Deserialize date value from text as midnight date in default (local) time zone.
|
static DateTime |
deserializeLocalDateTime(java.lang.String text)
Deserialize date/time value from text into the local (default) time zone.
|
static LocalTime |
deserializeLocalTime(java.lang.String text)
Deserialize time value from text as local time.
|
static DateTime |
deserializeStrictLocalDateTime(java.lang.String text)
Deserialize local (default zone) date/time value from text with time zone required.
|
static DateTime |
deserializeStrictUTCDateTime(java.lang.String text)
Deserialize UTC date/time value from text with time zone required.
|
static DateMidnight |
deserializeUTCDateMidnight(java.lang.String text)
Deserialize date value from text as midnight date in UTC time zone.
|
static DateTime |
deserializeUTCDateTime(java.lang.String text)
Deserialize UTC date/time value from text into the UTC time zone.
|
static DateMidnight |
deserializeZonedDateMidnight(java.lang.String text)
Deserialize date value from text as midnight date in specified (or default) time zone.
|
static DateTime |
deserializeZonedDateTime(java.lang.String text)
Deserialize date/time value from text in specified (or default) time zone.
|
protected static DateTimeZone |
findZone(java.lang.String text,
DateTimeZone dflt)
Find the date/time zone for an xs:date or xs:dateTime text representation.
|
protected static DateTime |
parseDateTime(java.lang.String text,
boolean full,
DateTimeZone zone)
Parse date/time value from text.
|
static java.lang.String |
serializeLocalDate(LocalDate date)
Serialize local date value to general date text without time zone.
|
static java.lang.String |
serializeUnzonedDateMidnight(DateMidnight date)
Serialize midnight date value to general date text without time zone.
|
static java.lang.String |
serializeUnzonedLocalTime(LocalTime time)
Serialize local time value to general date text without time zone.
|
static java.lang.String |
serializeUTCDateMidnight(DateMidnight date)
Serialize midnight date value to general date text with UTC time zone.
|
static java.lang.String |
serializeUTCDateTime(DateTime time)
Serialize date/time to general dateTime text.
|
static java.lang.String |
serializeUTCLocalTime(LocalTime time)
Serialize local time value to general date text with UTC time zone.
|
static java.lang.String |
serializeZonedDateMidnight(DateMidnight date)
Serialize midnight date value to general date text with time zone offset.
|
static java.lang.String |
serializeZonedDateTime(DateTime time)
Serialize date/time to general dateTime text.
|
public static LocalDate deserializeLocalDate(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static java.lang.String serializeLocalDate(LocalDate date)
date
- date to be convertedprotected static DateMidnight deserializeDateMidnight(java.lang.String text, DateTimeZone zone) throws JiBXException
text
- zone
- JiBXException
protected static DateTimeZone findZone(java.lang.String text, DateTimeZone dflt) throws JiBXException
text
- xs:date or xs:dateTime valuedflt
- default zone to be returned if no zone specifiedJiBXException
public static DateMidnight deserializeZonedDateMidnight(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static DateMidnight deserializeLocalDateMidnight(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static DateMidnight deserializeUTCDateMidnight(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static java.lang.String serializeUnzonedDateMidnight(DateMidnight date)
date
- date to be convertedpublic static java.lang.String serializeZonedDateMidnight(DateMidnight date)
date
- date to be convertedpublic static java.lang.String serializeUTCDateMidnight(DateMidnight date)
date
- date to be convertedpublic static LocalTime deserializeLocalTime(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static java.lang.String serializeUnzonedLocalTime(LocalTime time)
time
- time to be convertedpublic static java.lang.String serializeUTCLocalTime(LocalTime time)
time
- time to be convertedprotected static DateTime parseDateTime(java.lang.String text, boolean full, DateTimeZone zone) throws JiBXException
text
- full
- zoned time required flag (exception thrown if missing)zone
- time zone used for returned date/timeJiBXException
public static DateTime deserializeZonedDateTime(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static DateTime deserializeUTCDateTime(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static DateTime deserializeLocalDateTime(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static DateTime deserializeStrictUTCDateTime(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static DateTime deserializeStrictLocalDateTime(java.lang.String text) throws JiBXException
null
input.text
- text to be parsed (may be null
)null
if passed null
inputJiBXException
- on parse errorpublic static java.lang.String serializeZonedDateTime(DateTime time)
time
- date/time to be convertedpublic static java.lang.String serializeUTCDateTime(DateTime time)
time
- date/time to be converted