/**
* 获取两个时间的间隔(秒)
* @param date1
* @param date2
* @author Hasee
* @return
*/
public static Long getDateBetween(Date date1,Date date2){
return Math.abs((date1.getTime()-date2.getTime())/1000);
}
计算时间差的工具类
最新推荐文章于 2024-07-07 12:24:57 发布