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