/**
* 计算时间相差的分钟数
* @param d1Str
* @param d2Str
* @param format
* @return
*/
public static long computeMin(String d1Str,String d2Str,String format) {
long result = -1 ;
try {
SimpleDateFormat dfs = new SimpleDateFormat(format);
java.util.Date begin = dfs.parse(d1Str);
java.util.Date end = dfs.parse(d2Str);
long between = (end.getTime() - begin.getTime()) / 1000;// 除以1000是为了转换成秒
result = between/60;
} catch (Exception e) {
e.printStackTrace();
}
return result ;
}