78 import java.text.ParsePosition; |
78 import java.text.ParsePosition; |
79 import java.time.DateTimeException; |
79 import java.time.DateTimeException; |
80 import java.time.Period; |
80 import java.time.Period; |
81 import java.time.ZoneId; |
81 import java.time.ZoneId; |
82 import java.time.ZoneOffset; |
82 import java.time.ZoneOffset; |
|
83 import java.time.chrono.ChronoLocalDateTime; |
83 import java.time.chrono.Chronology; |
84 import java.time.chrono.Chronology; |
84 import java.time.chrono.IsoChronology; |
85 import java.time.chrono.IsoChronology; |
85 import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; |
86 import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; |
86 import java.time.temporal.ChronoField; |
87 import java.time.temporal.ChronoField; |
87 import java.time.temporal.IsoFields; |
88 import java.time.temporal.IsoFields; |
471 * date and/or time that was resolved. Thus, an earlier stage would resolve |
472 * date and/or time that was resolved. Thus, an earlier stage would resolve |
472 * (year + month + day-of-month) to a date, and this stage would check that |
473 * (year + month + day-of-month) to a date, and this stage would check that |
473 * day-of-week was valid for the date. |
474 * day-of-week was valid for the date. |
474 * <li>If an {@linkplain #parsedExcessDays() excess number of days} |
475 * <li>If an {@linkplain #parsedExcessDays() excess number of days} |
475 * was parsed then it is added to the date if a date is available. |
476 * was parsed then it is added to the date if a date is available. |
|
477 * <li> If a second-based field is present, but {@code LocalTime} was not parsed, |
|
478 * then the resolver ensures that milli, micro and nano second values are |
|
479 * available to meet the contract of {@link ChronoField}. |
|
480 * These will be set to zero if missing. |
|
481 * <li>If both date and time were parsed and either an offset or zone is present, |
|
482 * the field {@link ChronoField#INSTANT_SECONDS} is created. |
|
483 * If an offset was parsed then the offset will be combined with the |
|
484 * {@code LocalDateTime} to form the instant, with any zone ignored. |
|
485 * If a {@code ZoneId} was parsed without an offset then the zone will be |
|
486 * combined with the {@code LocalDateTime} to form the instant using the rules |
|
487 * of {@link ChronoLocalDateTime#atZone(ZoneId)}. |
476 * </ol> |
488 * </ol> |
477 * |
489 * |
478 * @implSpec |
490 * @implSpec |
479 * This class is immutable and thread-safe. |
491 * This class is immutable and thread-safe. |
480 * |
492 * |