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