SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
Date date_begin = simpleDateFormat.parse(beginTime);
Date date_end = simpleDateFormat.parse(endTime);
Long duration = date_end.getTime() - date_begin.getTime();
// 计算差多少分钟
long nd = 1000 * 24 * 60 * 60;
long nh = 1000 * 60 * 60;
long nm = 1000 * 60;
int min = (int) (duration % nd % nh / nm);
ps:long大小不能打与int long.intValue();
16.3.30:写错了
int min = duration/nm