标签:style blog color art io for
1 // 两个日期相差的天数 2 public int differDays(String startDateString, String endDateString) 3 throws ParseException { 4 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 5 Date start = sdf.parse(startDateString); 6 Date end = sdf.parse(endDateString); 7 int differ = (int) ((end.getTime() - start.getTime()) / (3600 * 24 * 1000)); 8 return differ; 9 }
标签:style blog color art io for
原文地址:http://www.cnblogs.com/crane-practice/p/3851170.html