|
@ -199,6 +199,9 @@ public class DateUtil {
|
|
|
if (StringUtils.isEmpty(strDate)) {
|
|
|
return null;
|
|
|
}
|
|
|
if(strDate.length()<=10&&format.length()>10){
|
|
|
format = format.substring(0,strDate.length());
|
|
|
}
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(format);
|
|
|
LocalDate localDate = LocalDate.parse(strDate,dateTimeFormatter);
|
|
|
return Date.from(localDate.atStartOfDay(zone).toInstant());
|
|
@ -862,7 +865,7 @@ public class DateUtil {
|
|
|
* 字符串转时间
|
|
|
*/
|
|
|
public static Date stringToDate(String str, String eg) {
|
|
|
return strToDate(str,eg);
|
|
|
return strToDate(str);
|
|
|
}
|
|
|
|
|
|
public static int getNowMonth(){
|