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

API: Calendar interface for getting days in month

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 1.1.2, 1.1.4, 1.2.0
    • core-libs
    • 1.2beta4
    • generic, x86, sparc
    • generic, solaris_2.5.1, windows_nt
    • Not verified

      An interface for finding the number of days in the current month would be
      useful. As it stands, we need an array of month lengths and the isLeapYear
      method to determine the length of a month. This introduces a dependency on the
      gregorian calendar that we would rather not have in our application code. This
      calculation belongs in the calendar (or simple calendar) class.

      =================================================================

      It would be really nice if it were possible to
      do

          int d = someCalendar.get(DAYS_IN_MONTH);

      in order to find our how many days the current
      month has in it.

            aliusunw Alan Liu (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: