java.time.YearMonth.plus() 方法示例 java.time.YearMonth.parse(CharSequence text, DateTimeFormatter formatter) java.time.YearMonth.plus(TemporalAmount amountToAdd) java.time.YearMonth.plus() 方法示例 package com.codingdict; import java.time.YearMonth; import java.time.temporal.ChronoUnit; public class YearMonthDemo { public static void main(String[] args) { YearMonth date = YearMonth.parse("2017-12"); YearMonth date1 = date.plus(10, ChronoUnit.YEARS); System.out.println(date1); } } java.time.YearMonth.parse(CharSequence text, DateTimeFormatter formatter) java.time.YearMonth.plus(TemporalAmount amountToAdd)