javadoc of `java.time.DayOfWeek#minus(long)`

99 Views Asked by At

The document writes:

The calculation rolls around the start of the year from Monday to Sunday.

Why does it use "year"?

I also found in plus() it's

The calculation rolls around the end of the week from Sunday to Monday.

And in java.time.Month, both minus() and plus() uses "year".

1

There are 1 best solutions below

0
samabcde On

This is reported in JDK-8326158 and confirmed to be a typo. Now fixed in JDK23 ea