public class LocalDateTimeType extends BaseValueType<LocalDateTime>
2011-12-03T10:15:30
See the parse() method for more parsing examples.
This class is threadsafe and uses a singleton pattern to prevent multiple
instances, since all users can safely use the same instance.clazzType| Modifier and Type | Method and Description |
|---|---|
LocalDateTime |
cast(Object o)
Attempt to cast the passed object to the generic type T.
|
static LocalDateTimeType |
get() |
static LocalDateTimeType |
instance() |
LocalDateTime |
parse(String sourceValue)
The text format used is the default for LocalDateTime objects, which uses the
ISO format like this:
2011-12-03T10:15:30. |
getDestinationType, isParsable, toStringpublic static LocalDateTimeType get()
public static LocalDateTimeType instance()
public LocalDateTime parse(String sourceValue) throws ParsingException
2011-12-03T10:15:30. Full documentation
is here: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_LOCAL_DATE
Here are some sample valid values:
2011-12-03T10:15:30 - Year, month, day, 'T', Hour, minute, second
0001-01-03T01:01:01 - All values must be zero padded
2011-12-03T10:15 - Seconds are optional
2011-12-03T10:15:25.123456789 - Decimal seconds up to 9 decimal places are allowed
2011-12-03T00:15:30 - The first hour is hour zero
2011-12-03T23:00:00 - The last hour is hour 23
sourceValue - ParsingExceptionpublic LocalDateTime cast(Object o) throws RuntimeException
ValueTypeRuntimeExceptionCopyright © 2017. All rights reserved.