From ffd97743622a4d91c8e09f88b22652adc05df2cf Mon Sep 17 00:00:00 2001 From: Nadeesh TV Date: Wed, 6 Apr 2016 11:45:15 +0000 Subject: [PATCH] 8148950: Enhance ChronoField Javadoc Made the suggested changes in the doc. Reviewed-by: rriggs, scolebourne --- .../classes/java/time/temporal/ChronoField.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/time/temporal/ChronoField.java b/jdk/src/java.base/share/classes/java/time/temporal/ChronoField.java index fe3254e60ab..d3c6a056fd1 100644 --- a/jdk/src/java.base/share/classes/java/time/temporal/ChronoField.java +++ b/jdk/src/java.base/share/classes/java/time/temporal/ChronoField.java @@ -1,5 +1,5 @@ /* - * 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 @@ -270,6 +270,8 @@ public enum ChronoField implements TemporalField { * 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. + *

+ * 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)), /** @@ -284,6 +286,8 @@ public enum ChronoField implements TemporalField { * 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. + *

+ * 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)), /** @@ -299,12 +303,14 @@ public enum ChronoField implements TemporalField { * {@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()}. + *

+ * 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. *

- * 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. *

@@ -313,6 +319,8 @@ public enum ChronoField implements TemporalField { * 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. + *

+ * 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)), /**