8148950: Enhance ChronoField Javadoc
Made the suggested changes in the doc. Reviewed-by: rriggs, scolebourne
This commit is contained in:
parent
0bb34e0668
commit
ffd9774362
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
* In lenient mode the value is not validated. It is combined with
|
||||||
* {@code AMPM_OF_DAY} to form {@code HOUR_OF_DAY} by multiplying
|
* {@code AMPM_OF_DAY} to form {@code HOUR_OF_DAY} by multiplying
|
||||||
* the {AMPM_OF_DAY} value by 12.
|
* 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)),
|
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.
|
* 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,
|
* 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.
|
* 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)),
|
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}.
|
* {@code NANO_OF_SECOND} to produce a {@code LocalTime}.
|
||||||
* In lenient mode, any excess days are added to the parsed date, or
|
* In lenient mode, any excess days are added to the parsed date, or
|
||||||
* made available via {@link java.time.format.DateTimeFormatter#parsedExcessDays()}.
|
* 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"),
|
HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23), "hour"),
|
||||||
/**
|
/**
|
||||||
* The clock-hour-of-day.
|
* The clock-hour-of-day.
|
||||||
* <p>
|
* <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 is the hour that would be observed on a 24-hour analog wall clock.
|
||||||
* This field has the same meaning for all calendar systems.
|
* This field has the same meaning for all calendar systems.
|
||||||
* <p>
|
* <p>
|
||||||
@ -313,6 +319,8 @@ public enum ChronoField implements TemporalField {
|
|||||||
* 0 to 24 in smart mode. In lenient mode the value is not validated.
|
* 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,
|
* 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.
|
* 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)),
|
CLOCK_HOUR_OF_DAY("ClockHourOfDay", HOURS, DAYS, ValueRange.of(1, 24)),
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user