java time Year parse(CharSequencetext)方法从文本字符串(如2017-12)获取YearMonth的实例。1语法publicstaticYearMonthparse(CharSequence
java time Year of(intyear,Monthmonth)方法从年和月获取YearMonth的实例。1语法publicstaticYearMonthof(intyear,Monthmonth)2参数year:
java time Year of(intyear,intmonth)方法从指定年和月获取YearMonth的实例。1语法publicstaticYearMonthof(intyear,intmonth)2参数year:
java time Year now(ZoneIdzone)方法从指定时区中的系统时钟获取当前年月。1语法publicstaticYearMonthnow(ZoneIdzone)2参数zone:要使用的
java time Year now(Clockclock)方法从指定的时钟获取当前年月。1语法publicstaticYearMonthnow(Clockclock)2参数clock:要使用的时钟,而
java time Year now()方法从默认时区中的系统时钟获取当前年月。1语法publicstaticYearMonthnow()2参数无3返回值使用系统时钟和默认时区的
java time Year minusYears(longyearsToSubtract)方法返回此YearMonth减去指定年份的副本。1语法publicYearMonthminusYears(longyearsToSub
java time Year minusMonths(longmonthsToSubtract)方法返回此YearMonth的副本,并减去指定的月份。1语法publicYearMonthminusMonths(longm
java time Year minus(longamountToSubtract,TemporalUnitunit)方法返回今年的副本,并减去指定的数量。1语法publicYearMonthminus(longam
java time Year lengthOfYear()方法返回年份的长度(总天数)。1语法publicintlengthOfYear()2参数无3返回值如果年份是闰年,则返回366,否则