< prev index next >

src/java.base/share/classes/java/time/temporal/ChronoField.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -268,10 +268,12 @@
      * When parsing this field it behaves equivalent to the following:
      * The value is validated from 0 to 11 in strict and smart mode.
      * In lenient mode the value is not validated. It is combined with
      * {@code AMPM_OF_DAY} to form {@code HOUR_OF_DAY} by multiplying
      * the {AMPM_OF_DAY} value by 12.
+     * <p>
+     * See {@link #CLOCK_HOUR_OF_AMPM} for the related field that counts hours from 1 to 12.
      */
     HOUR_OF_AMPM("HourOfAmPm", HOURS, HALF_DAYS, ValueRange.of(0, 11)),
     /**
      * The clock-hour-of-am-pm.
      * <p>

@@ -282,10 +284,12 @@
      * When parsing this field it behaves equivalent to the following:
      * The value is validated from 1 to 12 in strict mode and from
      * 0 to 12 in smart mode. In lenient mode the value is not validated.
      * The field is converted to an {@code HOUR_OF_AMPM} with the same value,
      * unless the value is 12, in which case it is converted to 0.
+     * <p>
+     * See {@link #HOUR_OF_AMPM} for the related field that counts hours from 0 to 11.
      */
     CLOCK_HOUR_OF_AMPM("ClockHourOfAmPm", HOURS, HALF_DAYS, ValueRange.of(1, 12)),
     /**
      * The hour-of-day.
      * <p>

@@ -297,24 +301,28 @@
      * The value is validated in strict and smart mode but not in lenient mode.
      * The field is combined with {@code MINUTE_OF_HOUR}, {@code SECOND_OF_MINUTE} and
      * {@code NANO_OF_SECOND} to produce a {@code LocalTime}.
      * In lenient mode, any excess days are added to the parsed date, or
      * made available via {@link java.time.format.DateTimeFormatter#parsedExcessDays()}.
+     * <p>
+     * See {@link #CLOCK_HOUR_OF_DAY} for the related field that counts hours from 1 to 24.
      */
     HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23), "hour"),
     /**
      * The clock-hour-of-day.
      * <p>
-     * This counts the hour within the AM/PM, from 1 to 24.
+     * This counts the hour within the day, from 1 to 24.
      * This is the hour that would be observed on a 24-hour analog wall clock.
      * This field has the same meaning for all calendar systems.
      * <p>
      * When parsing this field it behaves equivalent to the following:
      * The value is validated from 1 to 24 in strict mode and from
      * 0 to 24 in smart mode. In lenient mode the value is not validated.
      * The field is converted to an {@code HOUR_OF_DAY} with the same value,
      * unless the value is 24, in which case it is converted to 0.
+     * <p>
+     * See {@link #HOUR_OF_DAY} for the related field that counts hours from 0 to 23.
      */
     CLOCK_HOUR_OF_DAY("ClockHourOfDay", HOURS, DAYS, ValueRange.of(1, 24)),
     /**
      * The am-pm-of-day.
      * <p>
< prev index next >