public final class LocalDateTimeParser extends java.lang.Object implements Parser<LocalDateTime>
LocalDateTime
instances using a
DateTimeFormatter
.Constructor and Description |
---|
LocalDateTimeParser(DateTimeFormatter formatter)
Create a new DateTimeParser.
|
Modifier and Type | Method and Description |
---|---|
LocalDateTime |
parse(java.lang.String text,
java.util.Locale locale)
Parse a text String to produce a T.
|
public LocalDateTimeParser(DateTimeFormatter formatter)
formatter
- the Joda DateTimeFormatter instancepublic LocalDateTime parse(java.lang.String text, java.util.Locale locale) throws java.text.ParseException
Parser
parse
in interface Parser<LocalDateTime>
text
- the text stringlocale
- the current user localejava.text.ParseException
- when a parse exception occurs in a java.text parsing library