/**
* 计算两个时间的差值
* @param min
* @param max
* @return x天x小时x分钟x秒
*/publicstatic String calDateInterval(Date min, Date max){
long maxTime = max.getTime();
long minTime = min.getTime();
long timeLag = maxTime - minTime;
String result ="";//天
long day = timeLag /(24*60*60*1000);if(day >0){
result = day +"天";}//小时
long hour =(timeLag /(60*60*1000)- day *24);if(hour >0){
result = hour +"小时";}//分钟
long minute =((timeLag /(60*1000))- day *24*60- hour *60);if(minute >0){
result = minute +"分钟";}//秒,顺便说一下,1秒 = 1000毫秒
long second =(timeLag /1000- day *24*60*60- hour *60*60- minute *60);if(second >0){
result = second +"秒";}return result;}