optimize codes

This commit is contained in:
Mauve
2026-09-20 12:29:39 +08:00
parent 67e8e056ba
commit 41e6b9bb29
21 changed files with 411 additions and 338 deletions
@@ -287,4 +287,21 @@ public class DateTimeUtil {
}
return returnDate;
}
public static String getDateByFormatPlusOneDay(Date dtDateTime, String strFormat) {
if (dtDateTime == null) {
return null;
}
try {
Calendar calendar = Calendar.getInstance();
calendar.setTime(dtDateTime);
calendar.add(Calendar.DAY_OF_MONTH, 1);
return new SimpleDateFormat(strFormat).format(calendar.getTime());
} catch (Exception err) {
return null;
}
}
}