Commit 89d894df authored by yanzg's avatar yanzg

Default Changelist

parent 60b6d1dc
......@@ -21,6 +21,7 @@ public class DateHelper {
public static final String FORMAT_MONTH_STRING = "yyyy-MM-01";
public static final String FORMAT_DAY_STRING = "yyyy-MM-dd";
public static final String FORMAT_TIME_STRING = "HH:mm:ss";
public static final String INIT_TIME = "00:00:00";
public static final String FORMAT_DAY_HOUR_STRING = "yyyy-MM-dd HH:00:00";
public static final String FORMAT_SECOND_STRING = "yyyy-MM-dd HH:mm:ss";
......@@ -37,6 +38,22 @@ public class DateHelper {
private static final int MONTH_11 = 11;
private static final int MONTH_12 = 12;
/**
* 判断时间是否是初始化时间
*
* @param time 历史初始化日期
* @return 新的日期
*/
public static final boolean isInitTime(String time) {
if (StringHelper.isEmpty(time)) {
return true;
}
if (StringHelper.compare(time, INIT_TIME.substring(0, time.length()))) {
return true;
}
return false;
}
/**
* 判断日期是否需要初始化,当需要时,返回新的日期
*
......
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