| Package | Description |
|---|---|
| org.aoju.bus.core.date |
日期封装,日期的核心为DateTime类
|
| org.aoju.bus.core.date.formatter |
提供线程安全的日期格式的格式化和解析实现
|
| org.aoju.bus.core.lang |
语言特性包,包括大量便捷的数据结构,例如验证器Validator,分布式ID生成器Snowflake等
|
| Modifier and Type | Method and Description |
|---|---|
static long |
Almanac.between(Date beginDate,
Date endDate,
Fields.Units units)
判断两个日期相差的时长,只保留绝对值
|
static long |
Almanac.between(Date beginDate,
Date endDate,
Fields.Units units,
boolean isAbs)
判断两个日期相差的时长
|
long |
DateTime.between(Date date,
Fields.Units units)
计算相差时长
|
long |
Between.between(Fields.Units units)
判断两个日期相差的时长
返回 给定单位的时长差
|
static String |
Formatter.formatBetween(Date beginDate,
Date endDate,
Fields.Units units)
格式化日期间隔输出
|
static String |
Formatter.formatBetween(long betweenMs,
Fields.Units units)
格式化日期间隔输出
|
String |
Between.toString(Fields.Units unit)
格式化输出时间差
|
| Modifier and Type | Method and Description |
|---|---|
Fields.Units |
DatePeriod.getUnit()
获得 格式化单位
|
| Modifier and Type | Method and Description |
|---|---|
void |
DatePeriod.setUnit(Fields.Units unit)
设置格式化单位
|
| Constructor and Description |
|---|
DatePeriod(long betweenMs,
Fields.Units units)
构造
|
DatePeriod(long betweenMs,
Fields.Units unit,
int unitMaxCount)
构造
|
| Modifier and Type | Method and Description |
|---|---|
static Fields.Units |
Fields.Units.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Fields.Units[] |
Fields.Units.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Copyright © 2022. All rights reserved.