Explorar el Código

[疲劳度][修改]:时间判断格式修改

release_toaliyun_real
Stormeye Wu hace 7 años
padre
commit
f3c53c47e2
Se han modificado 1 ficheros con 9 adiciones y 6 borrados
  1. +9
    -6
      mallinkService/src/main/java/com/iformall/utils/DateUtils.java

+ 9
- 6
mallinkService/src/main/java/com/iformall/utils/DateUtils.java Ver fichero

@@ -915,17 +915,20 @@ public class DateUtils {
String strDate = sdf.format(date); String strDate = sdf.format(date);


// 截取当前时间时分 // 截取当前时间时分
int strDateH = Integer.parseInt(strDate.substring(0, 2));
int strDateM = Integer.parseInt(strDate.substring(3, 5));
String[] dateArr = strDate.split(":");
int strDateH = Integer.parseInt(dateArr[0]);
int strDateM = Integer.parseInt(dateArr[1]);
int strDateT = strDateH * 60 + strDateM; int strDateT = strDateH * 60 + strDateM;


// 截取开始时间时分 // 截取开始时间时分
int strDateBeginH = Integer.parseInt(timeStart.substring(0, 2));
int strDateBeginM = Integer.parseInt(timeStart.substring(3, 5));
String[] startArr = timeStart.split(":");
int strDateBeginH = Integer.parseInt(startArr[0]);
int strDateBeginM = Integer.parseInt(startArr[1]);
int strDateBeginT = strDateBeginH * 60 + strDateBeginM; int strDateBeginT = strDateBeginH * 60 + strDateBeginM;
// 截取结束时间时分 // 截取结束时间时分
int strDateEndH = Integer.parseInt(timeEnd.substring(0, 2));
int strDateEndM = Integer.parseInt(timeEnd.substring(3, 5));
String[] endArr = timeEnd.split(":");
int strDateEndH = Integer.parseInt(endArr[0]);
int strDateEndM = Integer.parseInt(endArr[1]);
int strDateEndT = strDateEndH * 60 + strDateEndM; int strDateEndT = strDateEndH * 60 + strDateEndM;






Cargando…
Cancelar
Guardar