|
|
@ -520,7 +520,7 @@ public class DateUtil extends org.apache.commons.lang3.time.DateUtils {
|
|
|
|
public static String getBeforeMinute(String actDate, int hour) {
|
|
|
|
public static String getBeforeMinute(String actDate, int hour) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
long time = timeToStamp(actDate);
|
|
|
|
long time = timeToStamp(actDate);
|
|
|
|
long move = hour * 1000 * 60 * 60*60;
|
|
|
|
long move = hour * 1000 * 60 * 60 * 60;
|
|
|
|
time = time - move;
|
|
|
|
time = time - move;
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
Date date = new Date(time);
|
|
|
|
Date date = new Date(time);
|
|
|
@ -531,6 +531,7 @@ public class DateUtil extends org.apache.commons.lang3.time.DateUtils {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static String getLastDayFormat(int amount) {
|
|
|
|
public static String getLastDayFormat(int amount) {
|
|
|
|
SimpleDateFormat smdate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
SimpleDateFormat smdate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
Calendar calendar = new GregorianCalendar();
|
|
|
|
Calendar calendar = new GregorianCalendar();
|
|
|
@ -540,4 +541,15 @@ public class DateUtil extends org.apache.commons.lang3.time.DateUtils {
|
|
|
|
return formatDate;
|
|
|
|
return formatDate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String formatExpireTime(String str) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
Date date = DateUtil.parseDate(str, "yyyyMMdd");
|
|
|
|
|
|
|
|
return formatDate(date, "yyyy-MM-dd");
|
|
|
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return str;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|