--- a/jdk/src/share/classes/java/time/YearMonth.java Wed May 15 15:01:59 2013 +0100
+++ b/jdk/src/share/classes/java/time/YearMonth.java Wed May 15 07:48:57 2013 -0700
@@ -110,7 +110,7 @@
* However, any application that makes use of historical dates, and requires them
* to be accurate will find the ISO-8601 approach unsuitable.
*
- * <h3>Specification for implementors</h3>
+ * @implSpec
* This class is immutable and thread-safe.
*
* @since 1.8
@@ -944,10 +944,10 @@
}
/**
- * Calculates the period between this year-month and another year-month in
- * terms of the specified unit.
+ * Calculates the amount of time until another year-month in terms of the specified unit.
* <p>
- * This calculates the period between two year-months in terms of a single unit.
+ * This calculates the amount of time between two {@code YearMonth}
+ * objects in terms of a single {@code TemporalUnit}.
* The start and end points are {@code this} and the specified year-month.
* The result will be negative if the end is before the start.
* The {@code Temporal} passed to this method must be a {@code YearMonth}.
@@ -982,9 +982,9 @@
* This instance is immutable and unaffected by this method call.
*
* @param endYearMonth the end year-month, which must be a {@code YearMonth}, not null
- * @param unit the unit to measure the period in, not null
- * @return the amount of the period between this year-month and the end year-month
- * @throws DateTimeException if the period cannot be calculated
+ * @param unit the unit to measure the amount in, not null
+ * @return the amount of time between this year-month and the end year-month
+ * @throws DateTimeException if the amount cannot be calculated
* @throws UnsupportedTemporalTypeException if the unit is not supported
* @throws ArithmeticException if numeric overflow occurs
*/
@@ -992,7 +992,7 @@
public long periodUntil(Temporal endYearMonth, TemporalUnit unit) {
if (endYearMonth instanceof YearMonth == false) {
Objects.requireNonNull(endYearMonth, "endYearMonth");
- throw new DateTimeException("Unable to calculate period between objects of two different types");
+ throw new DateTimeException("Unable to calculate amount as objects are of two different types");
}
YearMonth end = (YearMonth) endYearMonth;
if (unit instanceof ChronoUnit) {