Commit c1063d50 authored by yanzg's avatar yanzg

修改实例化关系

parent 5d39575f
......@@ -20,6 +20,7 @@ public class DateHelper {
public static final String FORMAT_YEAR_END_STRING = "yyyy-12-31";
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 FORMAT_DAY_HOUR_STRING = "yyyy-MM-dd HH:00:00";
public static final String FORMAT_SECOND_STRING = "yyyy-MM-dd HH:mm:ss";
......@@ -757,6 +758,18 @@ public class DateHelper {
return to;
}
/**
* 获取时间为指定格式的字符串,为null则返回空字符串
*
* @param format 格式 yyyy-MM-dd HH:mm:ss
* @param date 字符串
* @return 转换后的结果
*/
public static String getDateTimeString(String format, String date) {
Date dt = getDateTime(date);
return getDateTimeString(format, dt);
}
/**
* 比较时间
*
......
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