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