修复DateUtil.offset空指针问题

This commit is contained in:
Looly 2024-06-14 01:34:16 +08:00
parent c5f92b4dea
commit 2e81de3ecb

View File

@ -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