feat: There is no way the oa add endTime
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user