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

(cal) API: need to redefine the Calendar.MONTH field and its constants

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • core-libs
    • None
    • b48
    • generic
    • generic

      The Calendar class defines the constants for the MONTH field as follows.

          /**
           * Value of the {@link #MONTH} field indicating the
           * first month of the year.
           */
          public final static int JANUARY = 0;

          /**
           * Value of the {@link #MONTH} field indicating the
           * second month of the year.
           */
          public final static int FEBRUARY = 1;

      etc.

      However, the definitions are not applicable to other calendar systems, like Japanese imperial calendar system. For example, the Showa era started on December 26, 1926. So, December is the first (and only) month of Showa Gannen (year 1).
      ###@###.### 2005-2-25 07:33:32 GMT
      ###@###.### 2005-05-25 13:51:12 GMT

            okutsu Masayoshi Okutsu
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: