cwkzhy

//获取天数(年)
Long start1 = null;
Long end1= null;
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
try {
Date startdate = sdf1.parse(end);
start1 = startdate.getTime();
Date enddate = sdf1.parse(end.substring(0, 4)+"-01-01");
end1 = enddate.getTime();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int dayy = (int) ((start1-end1)/(24*60*60*1000)+1);

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2021-11-09
  • 2021-11-27
猜你喜欢
  • 2021-11-04
  • 2021-11-14
  • 2021-11-28
  • 2021-11-14
  • 2021-12-08
  • 2021-11-18
  • 2021-11-18
相关资源
相似解决方案