Commit 0eae2e2f by 18356073052

计算两个时间差

1 parent 9b95f5c6
...@@ -152,4 +152,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils ...@@ -152,4 +152,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
// long sec = diff % nd % nh % nm / ns; // long sec = diff % nd % nh % nm / ns;
return day + "天" + hour + "小时" + min + "分钟"; return day + "天" + hour + "小时" + min + "分钟";
} }
/**
* 计算两个时间差
*/
public static long diffTime(Date endDate, Date nowDate){
return endDate.getTime() - nowDate.getTime();
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!