Closed dsmania closed 11 years ago
Bug, thanks for finding it.
# HG changeset patch
# User scolebourne
# Date 1372350309 -3600
# Node ID 7cf25c73ad120cf84e5a00bc81ffb18515cb21fc
# Parent 58935f771ca84303bd726eb468af57d11444a5d5
Fix ChronoField.INSTANT_SECONDS Javadoc
Fixes #323
diff --git a/src/share/classes/java/time/temporal/ChronoField.java b/src/share/classes/java/time/temporal/ChronoField.java
--- a/src/share/classes/java/time/temporal/ChronoField.java
+++ b/src/share/classes/java/time/temporal/ChronoField.java
@@ -565,12 +565,11 @@
* <p>
* This represents the concept of the sequential count of seconds where
* 1970-01-01T00:00Z (ISO) is zero.
- * This field may be used with {@link #NANO_OF_DAY} to represent the fraction of the day.
+ * This field may be used with {@link #NANO_OF_SECOND} to represent the fraction of the second.
* <p>
* An {@link Instant} represents an instantaneous point on the time-line.
- * On their own they have no elements which allow a local date-time to be obtained.
- * Only when paired with an offset or time-zone can the local date or time be found.
- * This field allows the seconds part of the instant to be queried.
+ * On their own, an instant has insufficient information to allow a local date-time to be obtained.
+ * Only when paired with an offset or time-zone can the local date or time be calculated.
* <p>
* This field is strictly defined to have the same meaning in all calendar systems.
* This is necessary to ensure interoperation between calendars.
looks fine.
In the documentation for ChronoFields.INSTANT_SECONDS you can read: " This field may be used with NANO_OF_DAY to represent the fraction of the day." It seems intuitive to me that it should refer to NANO_OF_SECOND as a fraction of the second. From my understanding it should be this way, but even if I'm wrong I believe many developers might fall in the same and might require a little explanation here.