1

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".

3
  • 4
    This looks like copy&paste error. You should file a bug report for that. Commented Feb 18, 2024 at 7:45
  • 1
    You can submit a bug here: bugreport.java.com/bugreport Commented Feb 18, 2024 at 8:52
  • Submitted a bug report on this, under review. Commented Feb 18, 2024 at 14:30

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.