120 * The ISO-8601 calendar system is the modern civil calendar system used today
121 * in most of the world. It is equivalent to the proleptic Gregorian calendar
122 * system, in which today's rules for leap years are applied for all time.
123 * For most applications written today, the ISO-8601 rules are entirely suitable.
124 * However, any application that makes use of historical dates, and requires them
125 * to be accurate will find the ISO-8601 approach unsuitable.
126 * <p>
127 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
128 * class; programmers should treat instances that are
129 * {@linkplain #equals(Object) equal} as interchangeable and should not
130 * use instances for synchronization, or unpredictable behavior may
131 * occur. For example, in a future release, synchronization may fail.
132 * The {@code equals} method should be used for comparisons.
133 *
134 * @implSpec
135 * This class is immutable and thread-safe.
136 *
137 * @since 1.8
138 */
139 @jdk.internal.ValueBased
140 public final class LocalDate
141 implements Temporal, TemporalAdjuster, ChronoLocalDate, Serializable {
142
143 /**
144 * The minimum supported {@code LocalDate}, '-999999999-01-01'.
145 * This could be used by an application as a "far past" date.
146 */
147 public static final LocalDate MIN = LocalDate.of(Year.MIN_VALUE, 1, 1);
148 /**
149 * The maximum supported {@code LocalDate}, '+999999999-12-31'.
150 * This could be used by an application as a "far future" date.
151 */
152 public static final LocalDate MAX = LocalDate.of(Year.MAX_VALUE, 12, 31);
153 /**
154 * The epoch year {@code LocalDate}, '1970-01-01'.
155 *
156 * @since 9
157 */
158 public static final LocalDate EPOCH = LocalDate.of(1970, 1, 1);
159
|
120 * The ISO-8601 calendar system is the modern civil calendar system used today
121 * in most of the world. It is equivalent to the proleptic Gregorian calendar
122 * system, in which today's rules for leap years are applied for all time.
123 * For most applications written today, the ISO-8601 rules are entirely suitable.
124 * However, any application that makes use of historical dates, and requires them
125 * to be accurate will find the ISO-8601 approach unsuitable.
126 * <p>
127 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
128 * class; programmers should treat instances that are
129 * {@linkplain #equals(Object) equal} as interchangeable and should not
130 * use instances for synchronization, or unpredictable behavior may
131 * occur. For example, in a future release, synchronization may fail.
132 * The {@code equals} method should be used for comparisons.
133 *
134 * @implSpec
135 * This class is immutable and thread-safe.
136 *
137 * @since 1.8
138 */
139 @jdk.internal.ValueBased
140 @jdk.internal.MigratedValueClass
141 public final class LocalDate
142 implements Temporal, TemporalAdjuster, ChronoLocalDate, Serializable {
143
144 /**
145 * The minimum supported {@code LocalDate}, '-999999999-01-01'.
146 * This could be used by an application as a "far past" date.
147 */
148 public static final LocalDate MIN = LocalDate.of(Year.MIN_VALUE, 1, 1);
149 /**
150 * The maximum supported {@code LocalDate}, '+999999999-12-31'.
151 * This could be used by an application as a "far future" date.
152 */
153 public static final LocalDate MAX = LocalDate.of(Year.MAX_VALUE, 12, 31);
154 /**
155 * The epoch year {@code LocalDate}, '1970-01-01'.
156 *
157 * @since 9
158 */
159 public static final LocalDate EPOCH = LocalDate.of(1970, 1, 1);
160
|