Commit 961d5883 authored by yanzg's avatar yanzg

Default Changelist

parent ac8c15a8
...@@ -85,6 +85,24 @@ public class DateHelper { ...@@ -85,6 +85,24 @@ public class DateHelper {
return null; return null;
} }
/**
* 组合日期和时间
*
* @param today 日期
* @param time 时间
* @return today(日期)+时间
*/
public static Date getTodayTime(Object today, String time) {
if (StringHelper.isEmpty(today)) {
return null;
}
time = StringHelper.getFirst(time, "00:00:00");
String day = DateHelper.getToday(today);
String toResult = String.format("%s %s", day, time);
return DateHelper.getDateTime(toResult);
}
/** /**
* 获取时间,会自动初始化毫秒为0 * 获取时间,会自动初始化毫秒为0
* *
......
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