mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
修复DateUtil.offset空指针问题
This commit is contained in:
parent
c5f92b4dea
commit
2e81de3ecb
@ -1217,6 +1217,9 @@ public class DateUtil extends CalendarUtil {
|
||||
* @return 偏移后的日期
|
||||
*/
|
||||
public static DateTime offset(final Date date, final DateField dateField, final int offset) {
|
||||
if (date == null) {
|
||||
return null;
|
||||
}
|
||||
return dateNew(date).offset(dateField, offset);
|
||||
}
|
||||
// endregion
|
||||
|
Loading…
x
Reference in New Issue
Block a user