| Package | Description |
|---|---|
| org.dromara.hutool.core.date.format |
提供线程安全的日期格式的格式化和解析实现
|
| org.dromara.hutool.core.date.format.parser |
提供日期解析相关封装,主要包括:
DateParser
/ \
FastDateParser RegisterDateParser
(根据日期格式解析) (根据注册的模式匹配解析)
|
| Modifier and Type | Class and Description |
|---|---|
class |
FastDateFormat
FastDateFormat 是一个线程安全的
SimpleDateFormat 实现:
日期字符串解析
日期格式化
通过以下静态方法获得此对象: FastDateFormat.getInstance(String, TimeZone, Locale)FastDateFormat.getDateInstance(int, TimeZone, Locale)FastDateFormat.getTimeInstance(int, TimeZone, Locale)FastDateFormat.getDateTimeInstance(int, int, TimeZone, Locale)
Thanks to Apache Commons Lang 3.5 |
| Modifier and Type | Interface and Description |
|---|---|
interface |
PositionDateParser
|
interface |
PredicateDateParser
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultRegexDateParser
默认正则日期解析器
通过使用预定义或自定义的正则规则,解析日期字符串 |
class |
FastDateParser
|
class |
PatternsDateParser
通过给定的日期格式解析日期时间字符串。
|
class |
RegexDateParser
使用正则列表方式的日期解析器
通过定义若干的日期正则,遍历匹配到给定正则后,按照正则方式解析为日期 |
class |
RegisterDateParser
基于注册的日期解析器,通过遍历列表,找到合适的解析器,然后解析为日期
默认的,可以调用 RegisterDateParser.INSTANCE使用全局的解析器,亦或者通过构造自定义独立的注册解析器 |
class |
TimeParser
时间日期字符串,日期默认为当天,支持格式类似于;
HH:mm:ss
HH:mm
|
Copyright © 2024. All rights reserved.