feat: There is no way the oa add endTime

This commit is contained in:
super_liu
2021-10-13 17:55:34 +08:00
parent fdcc307886
commit 180cecae8f
11 changed files with 108 additions and 3 deletions
@@ -31,6 +31,19 @@ public class Utils {
return days;
}
public static String addDay(Integer dayInt) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date today = new Date();
Calendar theCa = Calendar.getInstance();
theCa.setTime(today);
theCa.add(theCa.DATE, +dayInt);//最后一个数字30可改,30天的意思
Date start = theCa.getTime();
String startDate = sdf.format(start);//三十天之前日期
return startDate;
}
public static String interceptTime(String timeStr) {
if (StringUtils.isNotBlank(timeStr)) {
System.out.println(timeStr.length());