Calendar.getInstance().get(Calendar.MONTH);
is zero based, 10 is November. From the javadoc;
public static final int MONTH Field number for get and set indicating the month. This is a calendar-specific value. The first month of the year in the Gregorian and Julian calendars is JANUARY which is 0; the last depends on the number of months in a year.
Calendar.getInstance().get(Calendar.JANUARY);
is not a sensible thing to do, the value for JANUARY
is 0, which is the same as ERA
, you are effectively calling;
Calendar.getInstance().get(Calendar.ERA);