104 * often viewed as year-month-day-hour-minute-second. Other date and time fields,
105 * such as day-of-year, day-of-week and week-of-year, can also be accessed.
106 * Time is represented to nanosecond precision.
107 * For example, the value "2nd October 2007 at 13:45.30.123456789" can be
108 * stored in a {@code LocalDateTime}.
109 * <p>
110 * This class does not store or represent a time-zone.
111 * Instead, it is a description of the date, as used for birthdays, combined with
112 * the local time as seen on a wall clock.
113 * It cannot represent an instant on the time-line without additional information
114 * such as an offset or time-zone.
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 LocalDateTime} 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 LocalDateTime
136 implements Temporal, TemporalAdjuster, ChronoLocalDateTime<LocalDate>, Serializable {
137
138 /**
139 * The minimum supported {@code LocalDateTime}, '-999999999-01-01T00:00:00'.
140 * This is the local date-time of midnight at the start of the minimum date.
141 * This combines {@link LocalDate#MIN} and {@link LocalTime#MIN}.
142 * This could be used by an application as a "far past" date-time.
143 */
144 public static final LocalDateTime MIN = LocalDateTime.of(LocalDate.MIN, LocalTime.MIN);
|
104 * often viewed as year-month-day-hour-minute-second. Other date and time fields,
105 * such as day-of-year, day-of-week and week-of-year, can also be accessed.
106 * Time is represented to nanosecond precision.
107 * For example, the value "2nd October 2007 at 13:45.30.123456789" can be
108 * stored in a {@code LocalDateTime}.
109 * <p>
110 * This class does not store or represent a time-zone.
111 * Instead, it is a description of the date, as used for birthdays, combined with
112 * the local time as seen on a wall clock.
113 * It cannot represent an instant on the time-line without additional information
114 * such as an offset or time-zone.
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 LocalDateTime} 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 LocalDateTime
136 implements Temporal, TemporalAdjuster, ChronoLocalDateTime<LocalDate>, Serializable {
137
138 /**
139 * The minimum supported {@code LocalDateTime}, '-999999999-01-01T00:00:00'.
140 * This is the local date-time of midnight at the start of the minimum date.
141 * This combines {@link LocalDate#MIN} and {@link LocalTime#MIN}.
142 * This could be used by an application as a "far past" date-time.
143 */
144 public static final LocalDateTime MIN = LocalDateTime.of(LocalDate.MIN, LocalTime.MIN);
|