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

TemporalAdjusters dayOfWeekInMonth wrongly says "in the same month"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8u45
    • core-libs
    • b84
    • x86
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: