Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8129556

TemporalAdjusters dayOfWeekInMonth wrongly says "in the same month"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u45
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b84
    • CPU:
      x86
    • OS:
      windows_8

      Backports

        Description

        A DESCRIPTION OF THE PROBLEM :
        This method specifies "Returns the day-of-week in month adjuster, which returns a new date in the same month with the ordinal day-of-week."

        Notice the use of "in the same month". This is incorrect. As the documentation says itself: "The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03." This example clearly shows that the result is not always in the same month.

        The documentation should be reworded to adequately describe the possibility of returning a date in another month.


        URL OF FAULTY DOCUMENTATION :
        http://docs.oracle.com/javase/8/docs/api/java/time/temporal/TemporalAdjusters.html#dayOfWeekInMonth-int-java.time.DayOfWeek-

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rriggs Roger Riggs
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: