diff --git a/src/share/classes/java/time/Instant.java b/src/share/classes/java/time/Instant.java index 0ad4e2bb2fd6845f2726b1f9891f433f4abe41f2..e6544167f077bb268d470cc509203cfcdba6932f 100644 --- a/src/share/classes/java/time/Instant.java +++ b/src/share/classes/java/time/Instant.java @@ -156,14 +156,14 @@ import java.util.Objects; * internationally-agreed time scale is modified or replaced, a new * segment of the Java Time-Scale must be defined for it. Each segment * must meet these requirements: - *

* There are currently, as of 2013, two segments in the Java time-scale. *

* For the segment from 1972-11-03 (exact boundary discussed below) until diff --git a/src/share/classes/java/time/LocalDateTime.java b/src/share/classes/java/time/LocalDateTime.java index d0d1c9fc3958cacd155d28fc6b732cc264856dcf..f60d286bdbbe49a94af28aeb3e5567c12fc92706 100644 --- a/src/share/classes/java/time/LocalDateTime.java +++ b/src/share/classes/java/time/LocalDateTime.java @@ -1941,13 +1941,13 @@ public final class LocalDateTime * Outputs this date-time as a {@code String}, such as {@code 2007-12-03T10:15:30}. *

* The output will be one of the following ISO-8601 formats: - *

* The format used will be the shortest that outputs the full value of * the time where the omitted parts are implied to be zero. * diff --git a/src/share/classes/java/time/LocalTime.java b/src/share/classes/java/time/LocalTime.java index 786e84072d5ad08e70ab17f6c1ddc8d31448bb47..34ba18ebb5b01545999846c262b5160610e48bd9 100644 --- a/src/share/classes/java/time/LocalTime.java +++ b/src/share/classes/java/time/LocalTime.java @@ -1554,13 +1554,13 @@ public final class LocalTime * Outputs this time as a {@code String}, such as {@code 10:15}. *

* The output will be one of the following ISO-8601 formats: - *

* The format used will be the shortest that outputs the full value of * the time where the omitted parts are implied to be zero. * diff --git a/src/share/classes/java/time/OffsetDateTime.java b/src/share/classes/java/time/OffsetDateTime.java index 62deaf7a3989ca0305962ea74ea15e2be23c7978..755d6776c883860efe6ba4199bd1fe70059c6683 100644 --- a/src/share/classes/java/time/OffsetDateTime.java +++ b/src/share/classes/java/time/OffsetDateTime.java @@ -1880,13 +1880,13 @@ public final class OffsetDateTime * Outputs this date-time as a {@code String}, such as {@code 2007-12-03T10:15:30+01:00}. *

* The output will be one of the following ISO-8601 formats: - *

* The format used will be the shortest that outputs the full value of * the time where the omitted parts are implied to be zero. * diff --git a/src/share/classes/java/time/OffsetTime.java b/src/share/classes/java/time/OffsetTime.java index 62d141b0dca396a797b6f1c7c9f079c464e818b9..c9601a06d086a37c11cc7e50db0b8178274d5c1f 100644 --- a/src/share/classes/java/time/OffsetTime.java +++ b/src/share/classes/java/time/OffsetTime.java @@ -1351,13 +1351,13 @@ public final class OffsetTime * Outputs this time as a {@code String}, such as {@code 10:15:30+01:00}. *

* The output will be one of the following ISO-8601 formats: - *

* The format used will be the shortest that outputs the full value of * the time where the omitted parts are implied to be zero. * diff --git a/src/share/classes/java/time/ZoneId.java b/src/share/classes/java/time/ZoneId.java index 51f8d514957e2766ab028db01bcfd7e7a542b384..42f390937fbf5c4ec2247ffddfcf7622eae4c521 100644 --- a/src/share/classes/java/time/ZoneId.java +++ b/src/share/classes/java/time/ZoneId.java @@ -89,12 +89,12 @@ import java.util.TimeZone; * A {@code ZoneId} is used to identify the rules used to convert between * an {@link Instant} and a {@link LocalDateTime}. * There are two distinct types of ID: - *

* Most fixed offsets are represented by {@link ZoneOffset}. * Calling {@link #normalized()} on any {@code ZoneId} will ensure that a * fixed offset ID will be represented as a {@code ZoneOffset}. @@ -180,7 +180,7 @@ public abstract class ZoneId implements Serializable { * This is in line with versions of TZDB before 2005r. *

* This maps as follows: - *

* The map is unmodifiable. */ public static final Map OLD_SHORT_IDS; @@ -225,7 +225,7 @@ public abstract class ZoneId implements Serializable { * This is in line with TZDB 2005r and later. *

* This maps as follows: - *

* The map is unmodifiable. */ public static final Map SHORT_IDS; diff --git a/src/share/classes/java/time/ZoneOffset.java b/src/share/classes/java/time/ZoneOffset.java index f6d78ca372783c1e31270c43a6fe49308e28c126..d5f51fe6981be6175fc2470c6abfd8560d4b7263 100644 --- a/src/share/classes/java/time/ZoneOffset.java +++ b/src/share/classes/java/time/ZoneOffset.java @@ -166,7 +166,7 @@ public final class ZoneOffset * This method parses the string ID of a {@code ZoneOffset} to * return an instance. The parsing accepts all the formats generated by * {@link #getId()}, plus some additional formats: - *

* Note that ± means either the plus or minus symbol. *

* The ID of the returned offset will be normalized to one of the formats @@ -471,11 +471,11 @@ public final class ZoneOffset *

* The ID is minor variation to the standard ISO-8601 formatted string * for the offset. There are three formats: - *

* * @return the zone offset ID, not null */ diff --git a/src/share/classes/java/time/ZonedDateTime.java b/src/share/classes/java/time/ZonedDateTime.java index 679653f61b114d1e90fe27c13941e8739e8179e2..e950db7339dfbef71d15a0fe74349b1c085d8dd9 100644 --- a/src/share/classes/java/time/ZonedDateTime.java +++ b/src/share/classes/java/time/ZonedDateTime.java @@ -111,7 +111,7 @@ import java.util.Objects; * Obtaining the offset for an instant is simple, as there is exactly one valid * offset for each instant. By contrast, obtaining the offset for a local date-time * is not straightforward. There are three cases: - *

*

* Any method that converts directly or implicitly from a local date-time to an * instant by obtaining the offset has the potential to be complicated. @@ -1699,12 +1699,12 @@ public final class ZonedDateTime *

* For example, consider a time-zone where the spring DST cutover means that the * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00. - *

*

* This instance is immutable and unaffected by this method call. * @@ -1940,12 +1940,12 @@ public final class ZonedDateTime *

* For example, consider a time-zone where the spring DST cutover means that the * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00. - *

*

* This instance is immutable and unaffected by this method call. * diff --git a/src/share/classes/java/time/chrono/ChronoLocalDate.java b/src/share/classes/java/time/chrono/ChronoLocalDate.java index 9fba962c5ece2477508731d3c4da15687a7d8aff..baa7b69348cc7489c2f056661d4e13c47d04144e 100644 --- a/src/share/classes/java/time/chrono/ChronoLocalDate.java +++ b/src/share/classes/java/time/chrono/ChronoLocalDate.java @@ -195,13 +195,13 @@ import java.util.Objects; * *

Using LocalDate instead

* The primary alternative to using this interface throughout your application is as follows. - *

* This approach treats the problem of globalized calendar systems as a localization issue * and confines it to the UI layer. This approach is in keeping with other localization * issues in the java platform. @@ -222,13 +222,13 @@ import java.util.Objects; * For example, an application may need to calculate the next Islamic or Hebrew holiday * which may require manipulating the date. * This kind of use case can be handled as follows: - *

* Developers writing low-level frameworks or libraries should also avoid this interface. * Instead, one of the two general purpose access interfaces should be used. * Use {@link TemporalAccessor} if read-only access is required, or use {@link Temporal} diff --git a/src/share/classes/java/time/chrono/Chronology.java b/src/share/classes/java/time/chrono/Chronology.java index 184bcbe506417d0cf389df0286c46b9076b77ba3..7c17da1ea5b5088e93f5bedae011f61b61d67db4 100644 --- a/src/share/classes/java/time/chrono/Chronology.java +++ b/src/share/classes/java/time/chrono/Chronology.java @@ -117,7 +117,7 @@ import java.util.Set; *

* The {@code Chronology} instance provides a set of methods to create {@code ChronoLocalDate} instances. * The date classes are used to manipulate specific dates. - *

* *

Adding New Calendars

* The set of available chronologies can be extended by applications. @@ -163,10 +163,10 @@ public interface Chronology extends Comparable { * A {@code TemporalAccessor} represents an arbitrary set of date and time information, * which this factory converts to an instance of {@code Chronology}. *

- * The conversion will obtain the chronology using {@link TemporalQueries.chronology()}. + * The conversion will obtain the chronology using {@link TemporalQueries#chronology()}. * If the specified temporal object does not have a chronology, {@link IsoChronology} is returned. *

- * This method matches the signature of the functional interface {@link TemporalQueries. + * This method matches the signature of the functional interface {@link TemporalQuery} * allowing it to be used in queries via method reference, {@code Chronology::from}. * * @param temporal the temporal to convert, not null @@ -435,7 +435,7 @@ public interface Chronology extends Comparable { * The conversion typically uses the {@link ChronoField#EPOCH_DAY EPOCH_DAY} * field, which is standardized across calendar systems. *

- * This method matches the signature of the functional interface {@link TemporalQueries. + * This method matches the signature of the functional interface {@link TemporalQuery} * allowing it to be used as a query via method reference, {@code aChronology::date}. * * @param temporal the temporal object to convert, not null @@ -458,7 +458,7 @@ public interface Chronology extends Comparable { * those fields that are equivalent to the relevant objects. * The result uses this chronology. *

- * This method matches the signature of the functional interface {@link TemporalQueries. + * This method matches the signature of the functional interface {@link TemporalQuery} * allowing it to be used as a query via method reference, {@code aChronology::localDateTime}. * * @param temporal the temporal object to convert, not null @@ -490,7 +490,7 @@ public interface Chronology extends Comparable { * those fields that are equivalent to the relevant objects. * The result uses this chronology. *

- * This method matches the signature of the functional interface {@link TemporalQueries. + * This method matches the signature of the functional interface {@link TemporalQuery} * allowing it to be used as a query via method reference, {@code aChronology::zonedDateTime}. * * @param temporal the temporal object to convert, not null @@ -534,10 +534,10 @@ public interface Chronology extends Comparable { *

* A leap-year is a year of a longer length than normal. * The exact meaning is determined by the chronology according to the following constraints. - *

    + *
      *
    • a leap-year must imply a year-length longer than a non leap-year. *
    • a chronology that does not support the concept of a year must return false. - *

    + *

* * @param prolepticYear the proleptic-year to check, not validated for range * @return true if the year is a leap year diff --git a/src/share/classes/java/time/chrono/Era.java b/src/share/classes/java/time/chrono/Era.java index 9cf57fc8fc1538f43ae7faae23515846295bb16d..ec65e3f7531518977fa3259e7bb097b8505498d8 100644 --- a/src/share/classes/java/time/chrono/Era.java +++ b/src/share/classes/java/time/chrono/Era.java @@ -111,11 +111,11 @@ public interface Era extends TemporalAccessor, TemporalAdjuster { * All fields, including eras, have an associated numeric value. * The meaning of the numeric value for era is determined by the chronology * according to these principles: - *

    + *
      *
    • The era in use at the epoch 1970-01-01 (ISO) has the value 1. *
    • Later eras have sequentially higher values. *
    • Earlier eras have sequentially lower values, which may be negative. - *

    + *

* * @return the numeric era value */ diff --git a/src/share/classes/java/time/chrono/IsoChronology.java b/src/share/classes/java/time/chrono/IsoChronology.java index eb71a1fe65ca8136cd7cf5c998317f3ca259cf2e..d45b042b9fa721b7485a533b360b8ff6a2e4c701 100644 --- a/src/share/classes/java/time/chrono/IsoChronology.java +++ b/src/share/classes/java/time/chrono/IsoChronology.java @@ -100,7 +100,7 @@ import java.util.Objects; * de facto world calendar. *

* The fields are defined as follows: - *

    + *
      *
    • era - There are two eras, 'Current Era' (CE) and 'Before Current Era' (BCE). *
    • year-of-era - The year-of-era is the same as the proleptic-year for the current CE era. * For the BCE era before the ISO epoch the year increases from 1 upwards as time goes backwards. @@ -113,7 +113,7 @@ import java.util.Objects; *
    • day-of-year - There are 365 days in a standard ISO year and 366 in a leap year. * The days are numbered from 1 to 365 or 1 to 366. *
    • leap-year - Leap years occur every 4 years, except where the year is divisble by 100 and not divisble by 400. - *

    + *

* * @implSpec * This class is immutable and thread-safe. diff --git a/src/share/classes/java/time/chrono/IsoEra.java b/src/share/classes/java/time/chrono/IsoEra.java index 15fa2e4cc6d8364f56ae92b6c2849f595d3f4e78..bd299691ace44d61324217ea0d12c6b5e10866f2 100644 --- a/src/share/classes/java/time/chrono/IsoEra.java +++ b/src/share/classes/java/time/chrono/IsoEra.java @@ -69,7 +69,7 @@ import java.time.DateTimeException; * The ISO-8601 standard does not define eras. * A definition has therefore been created with two eras - 'Current era' (CE) for * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that. - *

+ * * * * diff --git a/src/share/classes/java/time/chrono/MinguoChronology.java b/src/share/classes/java/time/chrono/MinguoChronology.java index af0be986c933b226dbe7ffe0d3a7d8bd5a5709f7..8e26f7d43c0481b0a2455af34727ff47432c70b0 100644 --- a/src/share/classes/java/time/chrono/MinguoChronology.java +++ b/src/share/classes/java/time/chrono/MinguoChronology.java @@ -85,7 +85,7 @@ import java.util.Map; * Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}. *

* The fields are defined as follows: - *

    + *
      *
    • era - There are two eras, the current 'Republic' (ERA_ROC) and the previous era (ERA_BEFORE_ROC). *
    • year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one. * For the previous era the year increases from one as time goes backwards. @@ -98,7 +98,7 @@ import java.util.Map; *
    • day-of-year - The Minguo day-of-year exactly matches ISO. *
    • leap-year - The Minguo leap-year pattern exactly matches ISO, such that the two calendars * are never out of step. - *

    + *

* * @implSpec * This class is immutable and thread-safe. diff --git a/src/share/classes/java/time/chrono/MinguoEra.java b/src/share/classes/java/time/chrono/MinguoEra.java index 6bfdab2551d372d24fe78b7fe600b54e71ac4a69..fd96de196ee2498a986a875bd3571ae6559a7787 100644 --- a/src/share/classes/java/time/chrono/MinguoEra.java +++ b/src/share/classes/java/time/chrono/MinguoEra.java @@ -70,7 +70,7 @@ import java.time.DateTimeException; * The current era, for years from 1 onwards, is known as the 'Republic of China' era. * All previous years, zero or earlier in the proleptic count or one and greater * in the year-of-era count, are part of the 'Before Republic of China' era. - *

+ * *

* * diff --git a/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java b/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java index c41aa34c0f1511915160d6472219a3c6fefd9fc0..2ef5793586f5197e0c2409705c5dbad256549351 100644 --- a/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java +++ b/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java @@ -86,7 +86,7 @@ import java.util.Map; * Dates are aligned such that {@code 2484-01-01 (Buddhist)} is {@code 1941-01-01 (ISO)}. *

* The fields are defined as follows: - *

    + *
      *
    • era - There are two eras, the current 'Buddhist' (ERA_BE) and the previous era (ERA_BEFORE_BE). *
    • year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one. * For the previous era the year increases from one as time goes backwards. @@ -99,7 +99,7 @@ import java.util.Map; *
    • day-of-year - The ThaiBuddhist day-of-year exactly matches ISO. *
    • leap-year - The ThaiBuddhist leap-year pattern exactly matches ISO, such that the two calendars * are never out of step. - *

    + *

* * @implSpec * This class is immutable and thread-safe. diff --git a/src/share/classes/java/time/chrono/ThaiBuddhistEra.java b/src/share/classes/java/time/chrono/ThaiBuddhistEra.java index c549229d35ecd4d5ac1d2af1a1703590709e22b4..e3e6e86fa45311d5a9843a5771c78477126ae5de 100644 --- a/src/share/classes/java/time/chrono/ThaiBuddhistEra.java +++ b/src/share/classes/java/time/chrono/ThaiBuddhistEra.java @@ -70,7 +70,7 @@ import java.time.DateTimeException; * The current era, for years from 1 onwards, is known as the 'Buddhist' era. * All previous years, zero or earlier in the proleptic count or one and greater * in the year-of-era count, are part of the 'Before Buddhist' era. - *

+ * *

* * diff --git a/src/share/classes/java/time/format/DateTimeFormatter.java b/src/share/classes/java/time/format/DateTimeFormatter.java index 0c0a5979b14840326bbc5d4d68cb0658cf006db0..4109d20e590ebbde2d46066fba56a9c8c5cbe576 100644 --- a/src/share/classes/java/time/format/DateTimeFormatter.java +++ b/src/share/classes/java/time/format/DateTimeFormatter.java @@ -146,7 +146,7 @@ import java.util.Set; * Some applications may need to use the older {@link Format java.text.Format} * class for formatting. The {@link #toFormat()} method returns an * implementation of {@code java.text.Format}. - *

+ * *

Predefined Formatters

*
* @@ -460,7 +460,7 @@ import java.util.Set; *
  • The {@code ChronoField} time fields are resolved. * This is documented on {@link ChronoField} and is the same for all chronologies. *
  • Any fields that are not {@code ChronoField} are processed. - * This is achieved using {@link TemporalField#resolve(Map, Chronology, ZoneId, ResolverStyle)}. + * This is achieved using {@link TemporalField#resolve(Map, TemporalAccessor, ResolverStyle)}. * Documentation about field resolution is located in the implementation * of {@code TemporalField}. *
  • The {@code ChronoField} date and time fields are re-resolved. @@ -684,7 +684,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended local date format. * The format consists of: - *

      + *
        *
      • Four digits or more for the {@link ChronoField#YEAR year}. * Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits. * Years outside that range will have a prefixed positive or negative symbol. @@ -719,7 +719,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset date format. * The format consists of: - *

          + *
            *
          • The {@link #ISO_LOCAL_DATE} *
          • The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. @@ -747,7 +747,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended date format. * The format consists of: - *

              + *
                *
              • The {@link #ISO_LOCAL_DATE} *
              • If the offset is not available then the format is complete. *
              • The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then @@ -780,7 +780,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended local time format. * The format consists of: - *

                  + *
                    *
                  • Two digits for the {@link ChronoField#HOUR_OF_DAY hour-of-day}. * This is pre-padded by zero to ensure two digits. *
                  • A colon @@ -821,7 +821,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset time format. * The format consists of: - *

                      + *
                        *
                      • The {@link #ISO_LOCAL_TIME} *
                      • The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. @@ -848,7 +848,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset time format. * The format consists of: - *

                          + *
                            *
                          • The {@link #ISO_LOCAL_TIME} *
                          • If the offset is not available then the format is complete. *
                          • The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then @@ -880,7 +880,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset date-time format. * The format consists of: - *

                              + *
                                *
                              • The {@link #ISO_LOCAL_DATE} *
                              • The letter 'T'. Parsing is case insensitive. *
                              • The {@link #ISO_LOCAL_TIME} @@ -908,7 +908,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset date-time format. * The format consists of: - *

                                  + *
                                    *
                                  • The {@link #ISO_LOCAL_DATE_TIME} *
                                  • The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. @@ -938,7 +938,7 @@ public final class DateTimeFormatter { * to add the time-zone. * The section in square brackets is not part of the ISO-8601 standard. * The format consists of: - *

                                      + *
                                        *
                                      • The {@link #ISO_OFFSET_DATE_TIME} *
                                      • If the zone ID is not available or is a {@code ZoneOffset} then the format is complete. *
                                      • An open square bracket '['. @@ -973,7 +973,7 @@ public final class DateTimeFormatter { * the ISO-8601 extended local or offset date-time format, as well as the * extended non-ISO form specifying the time-zone. * The format consists of: - *

                                          + *
                                            *
                                          • The {@link #ISO_LOCAL_DATE_TIME} *
                                          • If the offset is not available to format or parse then the format is complete. *
                                          • The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then @@ -1014,7 +1014,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended ordinal date format. * The format consists of: - *

                                              + *
                                                *
                                              • Four digits or more for the {@link ChronoField#YEAR year}. * Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits. * Years outside that range will have a prefixed positive or negative symbol. @@ -1054,7 +1054,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended week-based date format. * The format consists of: - *

                                                  + *
                                                    *
                                                  • Four digits or more for the {@link IsoFields#WEEK_BASED_YEAR week-based-year}. * Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits. * Years outside that range will have a prefixed positive or negative symbol. @@ -1114,7 +1114,7 @@ public final class DateTimeFormatter { * a suitable conversion using {@code ZoneOffset.UTC}. *

                                                    * The format consists of: - *

                                                      + *
                                                        *
                                                      • The {@link #ISO_OFFSET_DATE_TIME} where the instant is converted from * {@link ChronoField#INSTANT_SECONDS} and {@link ChronoField#NANO_OF_SECOND} * using the {@code UTC} offset. Parsing is case insensitive. @@ -1139,7 +1139,7 @@ public final class DateTimeFormatter { * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 basic local date format. * The format consists of: - *

                                                          + *
                                                            *
                                                          • Four digits for the {@link ChronoField#YEAR year}. * Only years in the range 0000 to 9999 are supported. *
                                                          • Two digits for the {@link ChronoField#MONTH_OF_YEAR month-of-year}. @@ -1183,7 +1183,7 @@ public final class DateTimeFormatter { * names, only 'GMT' and offset amounts. *

                                                            * The format consists of: - *

                                                              + *
                                                                *
                                                              • If the day-of-week is not available to format or parse then jump to day-of-month. *
                                                              • Three letter {@link ChronoField#DAY_OF_WEEK day-of-week} in English. *
                                                              • A comma @@ -1274,11 +1274,11 @@ public final class DateTimeFormatter { * a non-null period, with a zero period returned instead of null. *

                                                                * There are two situations where this query may return a non-zero period. - *

                                                                  + *
                                                                    *
                                                                  • If the {@code ResolverStyle} is {@code LENIENT} and a time is parsed * without a date, then the complete result of the parse consists of a * {@code LocalTime} and an excess {@code Period} in days. - *

                                                                    + * *

                                                                  • If the {@code ResolverStyle} is {@code SMART} and a time is parsed * without a date where the time is 24:00:00, then the complete result of * the parse consists of a {@code LocalTime} of 00:00:00 and an excess diff --git a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java index 56dd7f1ce860b51e7f396cab20e6805632774d73..29792b8bf796704ddab942a67068b99fe67339d5 100644 --- a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java +++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java @@ -125,7 +125,7 @@ import sun.util.locale.provider.TimeZoneNameUtility; * All date-time formatters are created ultimately using this builder. *

                                                                    * The basic elements of date-time can all be added: - *

                                                                      + *
                                                                        *
                                                                      • Value - a numeric value
                                                                      • *
                                                                      • Fraction - a fractional value including the decimal place. Always use this when * outputting fractions to ensure that the fraction is parsed correctly
                                                                      • @@ -138,7 +138,7 @@ import sun.util.locale.provider.TimeZoneNameUtility; *
                                                                      • Literal - a text literal
                                                                      • *
                                                                      • Nested and Optional - formats can be nested or made optional
                                                                      • *
                                                                      • Other - the printer and parser interfaces can be used to add user supplied formatting
                                                                      • - *

                                                                      + *

                                                                    * In addition, any of the elements may be decorated by padding, either with spaces or any other character. *

                                                                    * Finally, a shorthand pattern, mostly compatible with {@code java.text.SimpleDateFormat SimpleDateFormat} @@ -889,7 +889,7 @@ public final class DateTimeFormatterBuilder { *

                                                                    * The format of the offset is controlled by a pattern which must be one * of the following: - *

                                                                      + *
                                                                        *
                                                                      • {@code +HH} - hour only, ignoring minute and second *
                                                                      • {@code +HHmm} - hour, with minute if non-zero, ignoring second, no colon *
                                                                      • {@code +HH:mm} - hour, with minute if non-zero, ignoring second, with colon @@ -899,7 +899,7 @@ public final class DateTimeFormatterBuilder { *
                                                                      • {@code +HH:MM:ss} - hour and minute, with second if non-zero, with colon *
                                                                      • {@code +HHMMSS} - hour, minute and second, no colon *
                                                                      • {@code +HH:MM:SS} - hour, minute and second, with colon - *

                                                                      + *

                                                                    * The "no offset" text controls what text is printed when the total amount of * the offset fields to be output is zero. * Example values would be 'Z', '+00:00', 'UTC' or 'GMT'. @@ -921,14 +921,14 @@ public final class DateTimeFormatterBuilder { * This appends a localized zone offset to the builder, the format of the * localized offset is controlled by the specified {@link FormatStyle style} * to this method: - *

                                                                      + *
                                                                        *
                                                                      • {@link TextStyle#FULL full} - formats with localized offset text, such * as 'GMT, 2-digit hour and minute field, optional second field if non-zero, * and colon. *
                                                                      • {@link TextStyle#SHORT short} - formats with localized offset text, * such as 'GMT, hour without leading zero, optional 2-digit minute and * second if non-zero, and colon. - *

                                                                      + *

                                                                    *

                                                                    * During formatting, the offset is obtained using a mechanism equivalent * to querying the temporal with {@link TemporalQueries#offset()}. @@ -1244,12 +1244,12 @@ public final class DateTimeFormatterBuilder { * This appends a localized section to the builder, suitable for outputting * a date, time or date-time combination. The format of the localized * section is lazily looked up based on four items: - *

                                                                      + *
                                                                        *
                                                                      • the {@code dateStyle} specified to this method *
                                                                      • the {@code timeStyle} specified to this method *
                                                                      • the {@code Locale} of the {@code DateTimeFormatter} *
                                                                      • the {@code Chronology}, selecting the best available - *

                                                                      + *

                                                                    * During formatting, the chronology is obtained from the temporal object * being formatted, which may have been overridden by * {@link DateTimeFormatter#withChronology(Chronology)}. diff --git a/src/share/classes/java/time/temporal/IsoFields.java b/src/share/classes/java/time/temporal/IsoFields.java index e8ccff15f60e5582db9b6115b98346a46c32d9d3..8d9cc84f3c45589c3c5237f885abf4a8a8a6a9a3 100644 --- a/src/share/classes/java/time/temporal/IsoFields.java +++ b/src/share/classes/java/time/temporal/IsoFields.java @@ -72,12 +72,10 @@ import static java.time.temporal.ChronoUnit.YEARS; import java.time.DateTimeException; import java.time.Duration; import java.time.LocalDate; -import java.time.ZoneId; import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; import java.time.format.ResolverStyle; -import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Objects; @@ -102,11 +100,11 @@ import sun.util.locale.provider.LocaleResources; * October, November and December are in Q4. *

                                                                    * The complete date is expressed using three fields: - *

                                                                      + *
                                                                        *
                                                                      • {@link #DAY_OF_QUARTER DAY_OF_QUARTER} - the day within the quarter, from 1 to 90, 91 or 92 *
                                                                      • {@link #QUARTER_OF_YEAR QUARTER_OF_YEAR} - the week within the week-based-year *
                                                                      • {@link ChronoField#YEAR YEAR} - the standard ISO year - *

                                                                      + *

                                                                    * *

                                                                    Week based years

                                                                    * The ISO-8601 standard was originally intended as a data interchange format, @@ -114,18 +112,18 @@ import sun.util.locale.provider.LocaleResources; * alternate way of expressing the date, based on the concept of week-based-year. *

                                                                    * The date is expressed using three fields: - *

                                                                      + *
                                                                        *
                                                                      • {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} - the standard field defining the * day-of-week from Monday (1) to Sunday (7) *
                                                                      • {@link #WEEK_OF_WEEK_BASED_YEAR} - the week within the week-based-year *
                                                                      • {@link #WEEK_BASED_YEAR WEEK_BASED_YEAR} - the week-based-year - *

                                                                      + *

                                                                    * The week-based-year itself is defined relative to the standard ISO proleptic year. * It differs from the standard year in that it always starts on a Monday. *

                                                                    * The first week of a week-based-year is the first Monday-based week of the standard * ISO year that has at least 4 days in the new year. - *

                                                                      + *
                                                                        *
                                                                      • If January 1st is Monday then week 1 starts on January 1st *
                                                                      • If January 1st is Tuesday then week 1 starts on December 31st of the previous standard year *
                                                                      • If January 1st is Wednesday then week 1 starts on December 30th of the previous standard year @@ -133,11 +131,11 @@ import sun.util.locale.provider.LocaleResources; *
                                                                      • If January 1st is Friday then week 1 starts on January 4th *
                                                                      • If January 1st is Saturday then week 1 starts on January 3rd *
                                                                      • If January 1st is Sunday then week 1 starts on January 2nd - *

                                                                      + *

                                                                    * There are 52 weeks in most week-based years, however on occasion there are 53 weeks. *

                                                                    * For example: - *

                                                                    + * *

  • * * diff --git a/src/share/classes/java/time/temporal/JulianFields.java b/src/share/classes/java/time/temporal/JulianFields.java index f950d87201b9a9614237fb4a92512aaff0183f13..327037981eb4799666221ce3d36e7bffae6b016a 100644 --- a/src/share/classes/java/time/temporal/JulianFields.java +++ b/src/share/classes/java/time/temporal/JulianFields.java @@ -66,11 +66,9 @@ import static java.time.temporal.ChronoUnit.DAYS; import static java.time.temporal.ChronoUnit.FOREVER; import java.time.DateTimeException; -import java.time.ZoneId; import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; import java.time.format.ResolverStyle; -import java.util.Collections; import java.util.Map; /** @@ -116,7 +114,7 @@ public final class JulianFields { * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode} * the Julian Day value is validated against the range of valid values. * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs. - *

    + * *

    Astronomical and Scientific Notes

    * The standard astronomical definition uses a fraction to indicate the time-of-day, * thus 3.25 would represent the time 18:00, since days start at midday. @@ -124,7 +122,7 @@ public final class JulianFields { * The integer value for the Julian Day Number is the astronomical Julian Day value at midday * of the date in question. * This amounts to the astronomical Julian Day, rounded to an integer {@code JDN = floor(JD + 0.5)}. - *

    + * *

          *  | ISO date          |  Julian Day Number | Astronomical Julian Day |
          *  | 1970-01-01T00:00  |         2,440,588  |         2,440,587.5     |
    @@ -164,7 +162,7 @@ public final class JulianFields {
          * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode}
          * the Modified Julian Day value is validated against the range of valid values.
          * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs.
    -     * 

    + * *

    Astronomical and Scientific Notes

    *
          *  | ISO date          | Modified Julian Day |      Decimal MJD |
    @@ -176,7 +174,7 @@ public final class JulianFields {
          *  | 1970-01-02T06:00  |             40,588  |       40,588.25  |
          *  | 1970-01-02T12:00  |             40,588  |       40,588.5   |
          * 
    - *

    + * * Modified Julian Days are sometimes taken to imply Universal Time or UTC, but this * implementation always uses the Modified Julian Day for the local date, * regardless of the offset or time-zone. diff --git a/src/share/classes/java/time/temporal/Temporal.java b/src/share/classes/java/time/temporal/Temporal.java index 9931c46f4f16eb648eb5b1ff520df6d5c9c4d0ce..937a37e704f46dba457aa48882011e803c6a990d 100644 --- a/src/share/classes/java/time/temporal/Temporal.java +++ b/src/share/classes/java/time/temporal/Temporal.java @@ -95,15 +95,15 @@ import java.time.DateTimeException; *

    When to implement

    *

    * A class should implement this interface if it meets three criteria: - *

      + *
        *
      • it provides access to date/time/offset information, as per {@code TemporalAccessor} *
      • the set of fields are contiguous from the largest to the smallest *
      • the set of fields are complete, such that no other field is needed to define the * valid range of values for the fields that are represented - *

      + *

    *

    * Four examples make this clear: - *

      + *
        *
      • {@code LocalDate} implements this interface as it represents a set of fields * that are contiguous from days to forever and require no external information to determine * the validity of each date. It is therefore able to implement plus/minus correctly. @@ -117,7 +117,7 @@ import java.time.DateTimeException; *
      • The combination day-of-week and day-of-month ("Friday the 13th") should not implement * this interface. It does not represent a contiguous set of fields, as days to weeks overlaps * days to months. - *

      + *

    * * @implSpec * This interface places no restrictions on the mutability of implementations, diff --git a/src/share/classes/java/time/temporal/WeekFields.java b/src/share/classes/java/time/temporal/WeekFields.java index 0edfa73e2177b22f9c9f629600243d39e9d4fa98..dcc459af93df171c6542ea3ed57dcef86594e842 100644 --- a/src/share/classes/java/time/temporal/WeekFields.java +++ b/src/share/classes/java/time/temporal/WeekFields.java @@ -64,7 +64,6 @@ package java.time.temporal; import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; -import static java.time.temporal.ChronoField.EPOCH_DAY; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoUnit.DAYS; @@ -77,12 +76,9 @@ import java.io.InvalidObjectException; import java.io.Serializable; import java.time.DateTimeException; import java.time.DayOfWeek; -import java.time.ZoneId; import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; import java.time.format.ResolverStyle; -import java.util.Collections; -import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Objects; @@ -119,16 +115,16 @@ import sun.util.locale.provider.LocaleResources; * For example, the ISO-8601 standard considers Monday to be the first day-of-week. *
  • The minimal number of days in the first week. * For example, the ISO-8601 standard counts the first week as needing at least 4 days. - *

    + * * Together these two values allow a year or month to be divided into weeks. - *

    + * *

    Week of Month

    * One field is used: week-of-month. * The calculation ensures that weeks never overlap a month boundary. * The month is divided into periods where each period starts on the defined first day-of-week. * The earliest period is referred to as week 0 if it has less than the minimal number of days * and week 1 if it has at least the minimal number of days. - *

    + * *

  • Examples of Week based Years
    DateDay-of-weekField values
    * * diff --git a/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java b/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java index 95c66e6f275803be79fe6099e890415eb51a0ab2..d0b182b2628c29969d4c041fd601fb164c4e7a09 100644 --- a/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java +++ b/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java @@ -83,12 +83,12 @@ import java.util.Objects; *

    * This class allows rules for identifying future transitions to be expressed. * A rule might be written in many forms: - *

      + *
        *
      • the 16th March *
      • the Sunday on or after the 16th March *
      • the Sunday on or before the 16th March *
      • the last Sunday in February - *

      + *

    * These different rule types can be expressed and queried. * * @implSpec @@ -575,11 +575,11 @@ public final class ZoneOffsetTransitionRule implements Serializable { * transition date-time. *

    * Time zone rules are expressed in one of three ways: - *

      + *
        *
      • Relative to UTC
      • *
      • Relative to the standard offset in force
      • *
      • Relative to the wall offset (what you would see on a clock on the wall)
      • - *

      + *

    */ public static enum TimeDefinition { /** The local date-time is expressed in terms of the UTC offset. */ diff --git a/src/share/classes/java/time/zone/ZoneRules.java b/src/share/classes/java/time/zone/ZoneRules.java index 064a2d8f817dbce952435fcb0ae511fc615331ea..4ed12755c230c8fdeb69e328e5b51d76a778773a 100644 --- a/src/share/classes/java/time/zone/ZoneRules.java +++ b/src/share/classes/java/time/zone/ZoneRules.java @@ -508,7 +508,7 @@ public final class ZoneRules implements Serializable { *

    * The mapping from a local date-time to an offset is not straightforward. * There are three cases: - *

      + *
        *
      • Normal, with one valid offset. For the vast majority of the year, the normal * case applies, where there is a single valid offset for the local date-time.
      • *
      • Gap, with zero valid offsets. This is when clocks jump forward typically @@ -517,7 +517,7 @@ public final class ZoneRules implements Serializable { *
      • Overlap, with two valid offsets. This is when clocks are set back typically * due to the autumn daylight savings change from "summer" to "winter". * In an overlap there are local date-time values with two valid offsets.
      • - *

      + *

    * Thus, for any given local date-time there can be zero, one or two valid offsets. * This method returns the single offset in the Normal case, and in the Gap or Overlap * case it returns the offset before the transition. @@ -544,7 +544,7 @@ public final class ZoneRules implements Serializable { *

    * The mapping from a local date-time to an offset is not straightforward. * There are three cases: - *

      + *
        *
      • Normal, with one valid offset. For the vast majority of the year, the normal * case applies, where there is a single valid offset for the local date-time.
      • *
      • Gap, with zero valid offsets. This is when clocks jump forward typically @@ -553,7 +553,7 @@ public final class ZoneRules implements Serializable { *
      • Overlap, with two valid offsets. This is when clocks are set back typically * due to the autumn daylight savings change from "summer" to "winter". * In an overlap there are local date-time values with two valid offsets.
      • - *

      + *

    * Thus, for any given local date-time there can be zero, one or two valid offsets. * This method returns that list of valid offsets, which is a list of size 0, 1 or 2. * In the case where there are two offsets, the earlier offset is returned at index 0 @@ -595,7 +595,7 @@ public final class ZoneRules implements Serializable { *

    * The mapping from a local date-time to an offset is not straightforward. * There are three cases: - *

      + *
        *
      • Normal, with one valid offset. For the vast majority of the year, the normal * case applies, where there is a single valid offset for the local date-time.
      • *
      • Gap, with zero valid offsets. This is when clocks jump forward typically @@ -604,7 +604,7 @@ public final class ZoneRules implements Serializable { *
      • Overlap, with two valid offsets. This is when clocks are set back typically * due to the autumn daylight savings change from "summer" to "winter". * In an overlap there are local date-time values with two valid offsets.
      • - *

      + *

    * A transition is used to model the cases of a Gap or Overlap. * The Normal case will return null. *

    Examples of WeekFields
    DateDay-of-week