Commit 8c3b8c7d authored by 陈烨's avatar 陈烨

新增makeYesterdayStr

parent 75d2de73
...@@ -2838,4 +2838,12 @@ public class DateUtil { ...@@ -2838,4 +2838,12 @@ public class DateUtil {
return (second / 3600 > 0 ? hour + ":" : "") + min + "'" + sec + "''"; return (second / 3600 > 0 ? hour + ":" : "") + min + "'" + sec + "''";
} }
public static String makeYesterdayStr() {
Date date = getCurrentTimeDate();
Long yesterday = date.getTime() - 1000 * 60 * 60 * 24L;
date.setTime(yesterday);
String dateStr = DateUtil.dateToString(date, DateUtil.DATETIME_FORMAT);
return dateStr;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment