LinXiaoHai

//获取两个时间之间的日期
public static int getDatePoor(Date endDate, Date nowDate) {
Calendar cal = Calendar.getInstance();
cal.setTime(endDate);
long time1 = cal.getTimeInMillis();
cal.setTime(nowDate);
long time2 = cal.getTimeInMillis();
long between_days=(time2-time1)/(1000*3600*24);
int parseInt = Integer.parseInt(String.valueOf(between_days));
parseInt = parseInt + 1;
return parseInt ;

}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2018-01-24
  • 2022-12-23
  • 2021-07-14
  • 2022-01-03
  • 2021-10-17
相关资源
相似解决方案