JDK-6233055 : (cal) API: need to redefine the Calendar.MONTH field and its constants
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-02-25
  • Updated: 2017-05-16
  • Resolved: 2005-08-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b48Fixed
Related Reports
Relates :  
Description
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

Comments
EVALUATION The definitions should be: /** * Value of the {@link #MONTH} field indicating the * first month of the year in the Gregorian and Julian calendar systems. */ public final static int JANUARY = 0; /** * Value of the {@link #MONTH} field indicating the * second month of the year in the Gregorian and Julian calendar systems. */ public final static int FEBRUARY = 1; etc. ###@###.### 2005-2-25 07:36:02 GMT The following description must be correct for Calendar.MONTH. The first month of the year is JANUARY which is 0; ###@###.### 2005-03-16 03:53:55 GMT
25-02-2005