mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复DateUtil.offset空指针问题
This commit is contained in:
@@ -1460,6 +1460,9 @@ public class DateUtil extends CalendarUtil {
|
||||
* @return 偏移后的日期
|
||||
*/
|
||||
public static DateTime offset(Date date, DateField dateField, int offset) {
|
||||
if (date == null) {
|
||||
return null;
|
||||
}
|
||||
return dateNew(date).offset(dateField, offset);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user