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