计算两个calendar之间的时间差
public long getDays(Calendar c1, Calendar c2) {
long diffDays = (c1.getTimeInMillis() - c2.getTimeInMillis()) / (1000 * 60 * 60 * 24);
return diffDays;
}
Calendar计算时间差
最新推荐文章于 2021-05-31 14:42:26 发布
计算两个calendar之间的时间差
public long getDays(Calendar c1, Calendar c2) {
long diffDays = (c1.getTimeInMillis() - c2.getTimeInMillis()) / (1000 * 60 * 60 * 24);
return diffDays;
}