A DESCRIPTION OF THE PROBLEM :
It's likely an erratum in the document of `java.time.DayOfWeek#minus(long)` that in
"The calculation rolls around the start of the year from Monday to Sunday."
This should be
"The calculation rolls around the end of the week from Monday to Sunday."
However in java.time.DayOfWeek#plus() it is :
"The calculation rolls around the end of the week from Sunday to Monday."
Both minus() and plus() uses "week" as per implementation.
It's found in both https://docs.oracle.com/javase/8/docs/api/ and https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/time/DayOfWeek.html#minus(long)
It's likely an erratum in the document of `java.time.DayOfWeek#minus(long)` that in
"The calculation rolls around the start of the year from Monday to Sunday."
This should be
"The calculation rolls around the end of the week from Monday to Sunday."
However in java.time.DayOfWeek#plus() it is :
"The calculation rolls around the end of the week from Sunday to Monday."
Both minus() and plus() uses "week" as per implementation.
It's found in both https://docs.oracle.com/javase/8/docs/api/ and https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/time/DayOfWeek.html#minus(long)
- duplicates
-
JDK-8326124 Typo in java doc of DayOfWeek#minus
-
- Closed
-