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 Modifier and Type 方法 描述 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 Modifier and Type 方法 描述 int
Year. compareTo(Year other)
今年再比较一年。boolean
Year. isAfter(Year other)
检查今年是否在指定的年份之后。boolean
Year. isBefore(Year other)
Checks if this year is before the specified year.
-