/**
* 获取时间差xx小时xx分钟前
*@param newTime 新时间 2012-6-12 13:57:43
*@param oldTime 老时间 2012-6-12 10:52:48
*@return 描述
*@author hongj
*/
private String getTimeGap(String newTime,String oldTime){
String hDes = "";
String mDes = "";
String[] newtime = newTime.split(":");
int newH = Integer.parseInt(newtime[0]);
int newM = Integer.parseInt(newtime[1]);
String[] oldtime = oldTime.split(":");
int oldH = Integer.parseInt(oldtime[0]);
int oldM = Integer.parseInt(oldtime[1]);
int h = newH - oldH;
int m = newM - oldM;
int i = 0;
int k = 0;
if (0 < h) {
if(0 < m){
hDes = h+"小时";
mDes = m+"分钟";
}else if(0 > m){
i = 60 - oldM + newM;
mDes = i + "分钟";
if(1 < h){
k = h - 1;
hDes = k+"小时";
}
}else if(0 == m){
hDes = h+"小时";
}
}else if(0 < m){
mDes = m+"分钟";
}
return hDes+mDes+"前";
}