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