Commit 61769a83 authored by yanzg's avatar yanzg

接口文档的支持

parent aa1ba98b
...@@ -32,6 +32,28 @@ public class DateHelper { ...@@ -32,6 +32,28 @@ public class DateHelper {
private static final int MONTH_11 = 11; private static final int MONTH_11 = 11;
private static final int MONTH_12 = 12; private static final int MONTH_12 = 12;
/**
* 判断日期是否需要初始化,当需要时,返回新的日期
*
* @param initDay 历史初始化日期
* @param content 新的日期
* @return 新的日期
*/
public static final String getInitDay(String initDay, String content) {
String today = DateHelper.getToday();
String contentDay = DateHelper.getToday(content);
if (!StringHelper.isEmpty(initDay)) {
initDay = DateHelper.getToday(initDay);
if (StringHelper.compare(contentDay, initDay)) {
return StringHelper.EMPTY;
}
}
if (!StringHelper.compare(contentDay, today)) {
return StringHelper.EMPTY;
}
return today;
}
/** /**
* 获取时间 * 获取时间
* *
......
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