A DESCRIPTION OF THE PROBLEM :
The Javadocs for the java.time.Instant class currently contains the following sentence within the description of the until(Temporal endExclusive, TemporalUnit unit) method:
"For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, SECONDS)."
This is incorrect. It is stating that the example calculates the days between two Instants, but really it calculates the seconds between the two Instants.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"... For example, the amount in seconds between two dates can be calculated using startInstant.until(endInstant, SECONDS). ..."
OR
"... For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, DAYS). ..."
ACTUAL -
"... For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, SECONDS). ..."
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#until-java.time.temporal.Temporal-java.time.temporal.TemporalUnit-
The Javadocs for the java.time.Instant class currently contains the following sentence within the description of the until(Temporal endExclusive, TemporalUnit unit) method:
"For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, SECONDS)."
This is incorrect. It is stating that the example calculates the days between two Instants, but really it calculates the seconds between the two Instants.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"... For example, the amount in seconds between two dates can be calculated using startInstant.until(endInstant, SECONDS). ..."
OR
"... For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, DAYS). ..."
ACTUAL -
"... For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, SECONDS). ..."
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#until-java.time.temporal.Temporal-java.time.temporal.TemporalUnit-