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