java.lang.Object
org.miaixz.bus.core.center.date.format.parser.TimeParser
- All Implemented Interfaces:
Serializable,Predicate<CharSequence>,DateParser,PredicateDateParser
时间日期字符串,日期默认为当天,支持格式类似于;
HH:mm:ss HH:mm
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(CharSequence source) 解析时间字符串,默认日期为当天。booleantest(CharSequence date) 测试字符串是否符合时间格式。
-
Field Details
-
INSTANCE
单例实例
-
-
Constructor Details
-
TimeParser
public TimeParser()
-
-
Method Details
-
test
测试字符串是否符合时间格式。- Specified by:
testin interfacePredicate<CharSequence>- Parameters:
date- 时间字符串- Returns:
- 是否匹配时间格式
-
parse
解析时间字符串,默认日期为当天。- Specified by:
parsein interfaceDateParser- Parameters:
source- 时间字符串- Returns:
- 解析后的 DateTime 对象
-