Class TimeParser
java.lang.Object
org.miaixz.bus.core.center.date.printer.DefaultDatePrinter
org.miaixz.bus.core.center.date.format.parser.TimeParser
- All Implemented Interfaces:
Serializable,Predicate<CharSequence>,DateParser,PredicateDateParser,DatePrinter
时间日期字符串,日期默认为当天,支持格式类似于;
HH:mm:ss HH:mm
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription将日期字符串解析并转换为Date对象 等价于DateFormat.parse(String)booleantest(CharSequence dateStr) Methods inherited from class org.miaixz.bus.core.center.date.printer.DefaultDatePrinter
getLocale, getPattern, getTimeZoneMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.miaixz.bus.core.center.date.printer.DatePrinter
getLocale, getPattern, getTimeZone
-
Field Details
-
INSTANCE
单例
-
-
Constructor Details
-
TimeParser
public TimeParser()
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<CharSequence>
-
parse
Description copied from interface:DateParser将日期字符串解析并转换为Date对象 等价于DateFormat.parse(String)- Specified by:
parsein interfaceDateParser- Parameters:
source- 被解析的日期字符串- Returns:
Date对象
-