0
                || mCurrentDate.get(Calendar.MONTH) != month);
    } 
 
    private void updateSpinners() { 
        // set the spinner ranges respecting the min and max dates 
        mMonthSpinner.setDisplayedValues(null);
        mMonthSpinner.setMinValue(0);
        mMonthSpinner.setMaxValue(MONTHS_NUMBER - 1);
        if (mCurrentDate.get(Calendar.YEAR) == mMinDate.get(Calendar.YEAR)) {
            mMonthSpinner.setMinValue(mMinDate.get(Calendar.MONTH));
            mMonthSpinner.setWrapSelectorWheel(false);
        } else if (mCurrentDate.get(Calendar.YEAR) == mMaxDate.get(Calendar.YEAR)) {
            mMonthSpinner.setMaxValue(mMaxDate.get(Calendar.MONTH));
            mMonthSpinner.setWrapSelectorWheel(false);
        } else { 
            mMonthSpinner.setWrapSelectorWheel(true);
        } 
 
        // make sure the month names are a zero based array 
        // with the months in the month spinner 
        String[] displayedValues = Arrays.copyOfRange(mShortMonths,
                mMonthSpinner.getMinValue(), mMonthSpinner.getMaxValue() + 1);
        mMonthSpinner.setDisplayedValues(displayedValues);
 
        // year spinner range does not change based on the current date 
        mYearSpinner.setMinValue(mMinDate.get(Calendar.YEAR));
        mYearSpinner.setMaxValue(mMaxDate.get(Calendar.YEAR));
        mYearSpinner.setWrapSelectorWheel(false);
 
        // set the spinner values 
        mYearSpinner.setValue(mCurrentDate.get(Calendar.YEAR));
        mMonthSpinner.setValue(mCurrentDate.get(Calendar.MONTH));
    } 
 
    /** 
     * @return The selected year. 
     */