Package | Description |
---|---|
com.lc.core.date | |
com.lc.utils |
Modifier and Type | Method and Description |
---|---|
static DateField |
DateField.of(int calendarPartIntValue)
将
Calendar 相关值转换为DatePart枚举对象 |
static DateField |
DateField.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateField[] |
DateField.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
int |
DateTime.getField(DateField field)
获得日期的某个部分
例如获得年的部分,则使用 getField(DatePart.YEAR) |
DateTime |
DateTime.offset(DateField datePart,
int offset)
调整日期和时间
如果此对象为可变对象,返回自身,否则返回新对象,设置是否可变对象见 DateTime.setMutable(boolean) |
DateTime |
DateTime.offsetNew(DateField datePart,
int offset)
调整日期和时间
返回调整后的新 DateTime ,不影响原对象 |
DateTime |
DateTime.setField(DateField field,
int value)
设置日期的某个部分
如果此对象为可变对象,返回自身,否则返回新对象,设置是否可变对象见 DateTime.setMutable(boolean) |
Modifier and Type | Method and Description |
---|---|
static DateTime |
UDateUtil.offset(Date date,
DateField dateField,
int offset)
获取指定日期偏移指定时间后的时间,生成的偏移日期不影响原日期
|
Copyright © 2020. All rights reserved.