该变量dateSubtract
为 16,但我想找到这 2 天之间的总天数,应该是 165。没有 JODA TIME怎么办?
String date = "06/17/2014";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
LocalDate d1 = LocalDate.parse("01/01/2014", formatter);
LocalDate d2 = LocalDate.parse(date, formatter);
int dateSubtract = Period.between(d1, d2).getDays();