utils/src/main/java/org/yeshi/utils/DateUtil.java
@@ -55,6 +55,16 @@ return datatime; } /** * 通过时间秒毫秒数判断两个时间的间隔 * @param date1 * @param date2 * @return */ public static int differentDaysByMillisecond(Date start, Date end) { return (int) ((end.getTime() - start.getTime()) / (1000*3600*24)); } public String transferLongToDate(String dateFormat, Long millSec) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(millSec);