类 LocalDateParser
- java.lang.Object
- org.springframework.format.datetime.joda.LocalDateParser
public final class LocalDateParser extends Object implements Parser<LocalDate>
Parses JodaLocalDate
instances using aDateTimeFormatter
.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 LocalDateParser(DateTimeFormatter formatter)
Create a new DateTimeParser.
构造器详细资料
LocalDateParser
public LocalDateParser(DateTimeFormatter formatter)
Create a new DateTimeParser.- 参数:
formatter
- the Joda DateTimeFormatter instance
方法详细资料
parse
public LocalDate parse(String text, Locale locale) throws ParseException
从接口复制的说明:Parser
Parse a text String to produce a T.- 指定者:
parse
在接口中Parser<LocalDate>
- 参数:
text
- the text stringlocale
- the current user locale- 返回:
- an instance of T
- 抛出:
ParseException
- when a parse exception occurs in a java.text parsing library