📜  java代码示例中的localdate添加月份

📅  最后修改于: 2022-03-11 14:52:39.644000             🧑  作者: Mango

代码示例1
LocalDate date = LocalDate.parse("2020-05-21");
        // Displaying date
System.out.println("Date : "+date);
        // Add 2 months to the date
LocalDate newDate = date.plusMonths(2);
System.out.println("New Date : "+newDate); // 2020-07-21