Interface DateParser
- All Superinterfaces:
DateMotd
- All Known Subinterfaces:
PositionDateParser
- All Known Implementing Classes:
CSTDateParser,FastDateParser,FastTimeParser,FormatBuilder,NormalDateParser,PatternsDateParser,PureDateParser,UTCDateParser
日期解析接口,用于解析日期字符串为
Date 对象- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescription将日期字符串解析并转换为Date对象 等价于DateFormat.parse(String)default ObjectparseObject(String source) 将日期字符串解析并转换为Date对象Methods inherited from interface org.aoju.bus.core.date.formatter.DateMotd
getLocale, getPattern, getTimeZone
-
Method Details
-
parse
将日期字符串解析并转换为Date对象 等价于DateFormat.parse(String)- Parameters:
source- 被解析的日期字符串- Returns:
Date对象- Throws:
ParseException- 转换异常,被转换的字符串格式错误。
-
parseObject
将日期字符串解析并转换为Date对象- Parameters:
source- 被解析的日期字符串- Returns:
Date对象- Throws:
ParseException- if the beginning of the specified string cannot be parsed.- See Also:
-