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

Should specify that Calendar.getInstance() returns current date/time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • generic
    • generic



      Name: boT120536 Date: 11/13/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      The JavaDoc for Calendar.getInstance() simply says "Gets a calendar using the
      default time zone and locale." Although the Calendar that is returned is always
      set to the current date/time, this is not specified. This implies that you need
      to set it to the current time via setTime(), which is extra unnecessary work,
      and forces you to create an extra Date object. The JavaDoc should specify that
      the returned Calendar is for the current date/time (like the constructor for
      GregorianCalendar does).
      (Review ID: 112044)
      ======================================================================

            jhosunw Jamie Ho (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: