import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.Period;
import java.time.format.DateTimeFormatter;
import java.util.Date;
public class DateChal {
public static void main(String[] args) {
// TODO Auto-generated method stub
LocalDate start=LocalDate.parse("2018-10-25");
LocalDate end=LocalDate.parse("2019-10-25");
Period p=Period.between(start, end);
System.out.println("Number of days "+p.getDays());
}
}
o/p:Number of days 0 如何解决问题?还请解释什么是错的?
慕沐林林
扬帆大鱼
慕森卡
慕虎7371278
相关分类