查询日期补全方法
This commit is contained in:
parent
e0e53bfd9a
commit
7498922675
|
|
@ -0,0 +1,27 @@
|
|||
package com.sqx.modules.utils;
|
||||
|
||||
/**
|
||||
* @author GYJoker
|
||||
*/
|
||||
public class TimeCompleteUtils {
|
||||
|
||||
public static String completeStartTime(String startTime) {
|
||||
if (startTime == null || startTime.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (startTime.contains(" ")) {
|
||||
return startTime;
|
||||
}
|
||||
return startTime + " 00:00:00";
|
||||
}
|
||||
|
||||
public static String completeEndTime(String endTime) {
|
||||
if (endTime == null || endTime.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (endTime.contains(" ")) {
|
||||
return endTime;
|
||||
}
|
||||
return endTime + " 23:59:59";
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue