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 Modifier and Type 方法 描述 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 Modifier and Type 方法 描述 intYearMonth. compareTo(YearMonth other)比较今年至另一个月。booleanYearMonth. isAfter(YearMonth other)检查这个年月是否在指定的年月之后。booleanYearMonth. isBefore(YearMonth other)检查这个年月是否在指定的年份之前。
-