public class LocalDateFormatter extends Object implements org.springframework.format.Formatter<LocalDate>
Constructor and Description |
---|
LocalDateFormatter(String datePattern)
构造函数
|
Modifier and Type | Method and Description |
---|---|
LocalDate |
parse(String text,
Locale locale)
Parse a text String to produce a T.
|
String |
print(LocalDate localDate,
Locale locale)
Print the object of type T for display.
|
public LocalDateFormatter(String datePattern)
datePattern
- 时间格式化模式public LocalDate parse(String text, Locale locale) throws ParseException
parse
in interface org.springframework.format.Parser<LocalDate>
text
- the text stringlocale
- the current user localeParseException
- when a parse exception occurs in a java.text
parsing libraryIllegalArgumentException
- when a parse exception occursCopyright © 2021. All rights reserved.