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

Java API doc for method minusMonths in LocalDateTime class needs correction

XMLWordPrintable

    • b151
    • generic
    • generic
    • Not verified

      A DESCRIPTION OF THE PROBLEM :
      hi, when i check the description of the minusMonthmethod in LocalDateTime class, the apis says :
      "2007-03-31 minus one month would result in the invalid date 2007-04-31. "
      I wonder if the one is less than zero then the apis is rigth.
      but if the one is greater than zero ,i think it should be changed to
      "2007-03-31 minus one month would result in the invalid date 2007-02-31. "
      at first i really confused by the pre description :)


      URL OF FAULTY DOCUMENTATION :
      http://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#minusMonths-long-

            bgopularam Bhanu Prakash Gopularam (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: