クラス
java.time.Yearの使用
- 
java.timeでのYearの使用Yearを返すjava.timeのメソッド 修飾子と型 メソッド 説明 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)指定されたフィールドを新しい値に設定して、この年のコピーを返します。