104 * <p>
105 * <b>Note that years in the ISO chronology only align with years in the
106 * Gregorian-Julian system for modern years. Parts of Russia did not switch to the
107 * modern Gregorian/ISO rules until 1920.
108 * As such, historical years must be treated with caution.</b>
109 * <p>
110 * This class does not store or represent a month, day, time or time-zone.
111 * For example, the value "2007" can be stored in a {@code Year}.
112 * <p>
113 * Years represented by this class follow the ISO-8601 standard and use
114 * the proleptic numbering system. Year 1 is preceded by year 0, then by year -1.
115 * <p>
116 * The ISO-8601 calendar system is the modern civil calendar system used today
117 * in most of the world. It is equivalent to the proleptic Gregorian calendar
118 * system, in which today's rules for leap years are applied for all time.
119 * For most applications written today, the ISO-8601 rules are entirely suitable.
120 * However, any application that makes use of historical dates, and requires them
121 * to be accurate will find the ISO-8601 approach unsuitable.
122 *
123 * <p>
124 * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
125 * class; use of identity-sensitive operations (including reference equality
126 * ({@code ==}), identity hash code, or synchronization) on instances of
127 * {@code Year} may have unpredictable results and should be avoided.
128 * The {@code equals} method should be used for comparisons.
129 *
130 * @implSpec
131 * This class is immutable and thread-safe.
132 *
133 * @since 1.8
134 */
135 public final class Year
136 implements Temporal, TemporalAdjuster, Comparable<Year>, Serializable {
137
138 /**
139 * The minimum supported year, '-999,999,999'.
140 */
141 public static final int MIN_VALUE = -999_999_999;
142 /**
143 * The maximum supported year, '+999,999,999'.
144 */
|
104 * <p>
105 * <b>Note that years in the ISO chronology only align with years in the
106 * Gregorian-Julian system for modern years. Parts of Russia did not switch to the
107 * modern Gregorian/ISO rules until 1920.
108 * As such, historical years must be treated with caution.</b>
109 * <p>
110 * This class does not store or represent a month, day, time or time-zone.
111 * For example, the value "2007" can be stored in a {@code Year}.
112 * <p>
113 * Years represented by this class follow the ISO-8601 standard and use
114 * the proleptic numbering system. Year 1 is preceded by year 0, then by year -1.
115 * <p>
116 * The ISO-8601 calendar system is the modern civil calendar system used today
117 * in most of the world. It is equivalent to the proleptic Gregorian calendar
118 * system, in which today's rules for leap years are applied for all time.
119 * For most applications written today, the ISO-8601 rules are entirely suitable.
120 * However, any application that makes use of historical dates, and requires them
121 * to be accurate will find the ISO-8601 approach unsuitable.
122 *
123 * <p>
124 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
125 * class; use of identity-sensitive operations (including reference equality
126 * ({@code ==}), identity hash code, or synchronization) on instances of
127 * {@code Year} may have unpredictable results and should be avoided.
128 * The {@code equals} method should be used for comparisons.
129 *
130 * @implSpec
131 * This class is immutable and thread-safe.
132 *
133 * @since 1.8
134 */
135 public final class Year
136 implements Temporal, TemporalAdjuster, Comparable<Year>, Serializable {
137
138 /**
139 * The minimum supported year, '-999,999,999'.
140 */
141 public static final int MIN_VALUE = -999_999_999;
142 /**
143 * The maximum supported year, '+999,999,999'.
144 */
|