109 * the local date-time to be obtained.
110 * {@code ZonedDateTime} adds full time-zone rules.
111 * <p>
112 * It is intended that {@code ZonedDateTime} or {@code Instant} is used to model data
113 * in simpler applications. This class may be used when modeling date-time concepts in
114 * more detail, or when communicating to a database or in a network protocol.
115 * <p>
116 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
117 * class; programmers should treat instances that are
118 * {@linkplain #equals(Object) equal} as interchangeable and should not
119 * use instances for synchronization, or unpredictable behavior may
120 * occur. For example, in a future release, synchronization may fail.
121 * The {@code equals} method should be used for comparisons.
122 *
123 * @implSpec
124 * This class is immutable and thread-safe.
125 *
126 * @since 1.8
127 */
128 @jdk.internal.ValueBased
129 public final class OffsetDateTime
130 implements Temporal, TemporalAdjuster, Comparable<OffsetDateTime>, Serializable {
131
132 /**
133 * The minimum supported {@code OffsetDateTime}, '-999999999-01-01T00:00:00+18:00'.
134 * This is the local date-time of midnight at the start of the minimum date
135 * in the maximum offset (larger offsets are earlier on the time-line).
136 * This combines {@link LocalDateTime#MIN} and {@link ZoneOffset#MAX}.
137 * This could be used by an application as a "far past" date-time.
138 */
139 public static final OffsetDateTime MIN = LocalDateTime.MIN.atOffset(ZoneOffset.MAX);
140 /**
141 * The maximum supported {@code OffsetDateTime}, '+999999999-12-31T23:59:59.999999999-18:00'.
142 * This is the local date-time just before midnight at the end of the maximum date
143 * in the minimum offset (larger negative offsets are later on the time-line).
144 * This combines {@link LocalDateTime#MAX} and {@link ZoneOffset#MIN}.
145 * This could be used by an application as a "far future" date-time.
146 */
147 public static final OffsetDateTime MAX = LocalDateTime.MAX.atOffset(ZoneOffset.MIN);
148
|
109 * the local date-time to be obtained.
110 * {@code ZonedDateTime} adds full time-zone rules.
111 * <p>
112 * It is intended that {@code ZonedDateTime} or {@code Instant} is used to model data
113 * in simpler applications. This class may be used when modeling date-time concepts in
114 * more detail, or when communicating to a database or in a network protocol.
115 * <p>
116 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
117 * class; programmers should treat instances that are
118 * {@linkplain #equals(Object) equal} as interchangeable and should not
119 * use instances for synchronization, or unpredictable behavior may
120 * occur. For example, in a future release, synchronization may fail.
121 * The {@code equals} method should be used for comparisons.
122 *
123 * @implSpec
124 * This class is immutable and thread-safe.
125 *
126 * @since 1.8
127 */
128 @jdk.internal.ValueBased
129 @jdk.internal.MigratedValueClass
130 public final class OffsetDateTime
131 implements Temporal, TemporalAdjuster, Comparable<OffsetDateTime>, Serializable {
132
133 /**
134 * The minimum supported {@code OffsetDateTime}, '-999999999-01-01T00:00:00+18:00'.
135 * This is the local date-time of midnight at the start of the minimum date
136 * in the maximum offset (larger offsets are earlier on the time-line).
137 * This combines {@link LocalDateTime#MIN} and {@link ZoneOffset#MAX}.
138 * This could be used by an application as a "far past" date-time.
139 */
140 public static final OffsetDateTime MIN = LocalDateTime.MIN.atOffset(ZoneOffset.MAX);
141 /**
142 * The maximum supported {@code OffsetDateTime}, '+999999999-12-31T23:59:59.999999999-18:00'.
143 * This is the local date-time just before midnight at the end of the maximum date
144 * in the minimum offset (larger negative offsets are later on the time-line).
145 * This combines {@link LocalDateTime#MAX} and {@link ZoneOffset#MIN}.
146 * This could be used by an application as a "far future" date-time.
147 */
148 public static final OffsetDateTime MAX = LocalDateTime.MAX.atOffset(ZoneOffset.MIN);
149
|