Uses of Class
java.time.YearMonth
-
Packages that use YearMonth 软件包 描述 java.time 日期,时间,瞬间和持续时间的主要API。 -
-
Uses of YearMonth in java.time
Methods in java.time that return YearMonth 变量和类型 方法 描述 YearMonthYear. atMonth(int month)结合今年和一个月创建一个YearMonth。YearMonthYear. atMonth(Month month)结合今年和一个月创建一个YearMonth。static YearMonthYearMonth. from(TemporalAccessor temporal)从时态对象获得YearMonth的实例。YearMonthYearMonth. minus(long amountToSubtract, TemporalUnit unit)返回此年月份的副本,并减去指定的金额。YearMonthYearMonth. minus(TemporalAmount amountToSubtract)返回此年月份的副本,并减去指定的金额。YearMonthYearMonth. minusMonths(long monthsToSubtract)返回此YearMonth的副本,并减去指定的月数。YearMonthYearMonth. minusYears(long yearsToSubtract)返回此YearMonth的副本,并减去指定的年数。static YearMonthYearMonth. now()从默认时区中的系统时钟获取当前年月。static YearMonthYearMonth. now(Clock clock)从指定的时钟获得当前年月。static YearMonthYearMonth. now(ZoneId zone)从指定时区的系统时钟获取当前年月。static YearMonthYearMonth. of(int year, int month)从一年和一月获得YearMonth的实例。static YearMonthYearMonth. of(int year, Month month)从一年和一月获得YearMonth的实例。static YearMonthYearMonth. parse(CharSequence text)从文本字符串(如2007-12获取YearMonth的实例。static YearMonthYearMonth. parse(CharSequence text, DateTimeFormatter formatter)使用特定格式化程序从文本字符串中获取YearMonth的实例。YearMonthYearMonth. plus(long amountToAdd, TemporalUnit unit)返回指定金额的今年的副本。YearMonthYearMonth. plus(TemporalAmount amountToAdd)返回指定金额的今年的副本。YearMonthYearMonth. plusMonths(long monthsToAdd)返回此YearMonth的副本,并添加指定的月数。YearMonthYearMonth. plusYears(long yearsToAdd)返回此YearMonth的副本,并添加指定的年数。YearMonthYearMonth. with(TemporalAdjuster adjuster)返回此年度的调整副本。YearMonthYearMonth. with(TemporalField field, long newValue)返回此年月的副本,并将指定的字段设置为新值。YearMonthYearMonth. withMonth(int month)返回此YearMonth的副本,其中年份已更改。YearMonthYearMonth. withYear(int year)返回此YearMonth的副本,并更改年份。Methods in java.time with parameters of type YearMonth 变量和类型 方法 描述 intYearMonth. compareTo(YearMonth other)比较今年和另一个月。booleanYearMonth. isAfter(YearMonth other)检查此年月是否在指定的年月之后。booleanYearMonth. isBefore(YearMonth other)检查此年月是否在指定的年月之前。
-