Java Code Examples for java.util.Calendar#JULY

The following examples show how to use java.util.Calendar#JULY . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: UltimateAndroid   File: CalendarUtils.java    License: Apache License 2.0 6 votes vote down vote up
public static int getDaysInMonth(int month, int year) {
       switch (month) {
           case Calendar.JANUARY:
           case Calendar.MARCH:
           case Calendar.MAY:
           case Calendar.JULY:
           case Calendar.AUGUST:
           case Calendar.OCTOBER:
           case Calendar.DECEMBER:
               return 31;
           case Calendar.APRIL:
           case Calendar.JUNE:
           case Calendar.SEPTEMBER:
           case Calendar.NOVEMBER:
               return 30;
           case Calendar.FEBRUARY:
               return (year % 4 == 0) ? 29 : 28;
           default:
               throw new IllegalArgumentException("Invalid Month");
       }
}
 
Example 2
Source Project: cathode   File: Utils.java    License: Apache License 2.0 6 votes vote down vote up
public static int getDaysInMonth(int month, int year) {
    switch (month) {
        case Calendar.JANUARY:
        case Calendar.MARCH:
        case Calendar.MAY:
        case Calendar.JULY:
        case Calendar.AUGUST:
        case Calendar.OCTOBER:
        case Calendar.DECEMBER:
            return 31;
        case Calendar.APRIL:
        case Calendar.JUNE:
        case Calendar.SEPTEMBER:
        case Calendar.NOVEMBER:
            return 30;
        case Calendar.FEBRUARY:
            return (year % 4 == 0) ? 29 : 28;
        default:
            throw new IllegalArgumentException("Invalid Month");
    }
}
 
Example 3
public static int getDaysInMonth(int month, int year) {
    switch (month) {
        case Calendar.JANUARY:
        case Calendar.MARCH:
        case Calendar.MAY:
        case Calendar.JULY:
        case Calendar.AUGUST:
        case Calendar.OCTOBER:
        case Calendar.DECEMBER:
            return 31;
        case Calendar.APRIL:
        case Calendar.JUNE:
        case Calendar.SEPTEMBER:
        case Calendar.NOVEMBER:
            return 30;
        case Calendar.FEBRUARY:
            return (year % 4 == 0) ? 29 : 28;
        default:
            throw new IllegalArgumentException("Invalid Month");
    }
}
 
Example 4
Source Project: CustomizableCalendar   File: DateUtils.java    License: MIT License 6 votes vote down vote up
public static int getDaysInMonth(int month, int year) {
    switch (month) {
        case Calendar.JANUARY:
        case Calendar.MARCH:
        case Calendar.MAY:
        case Calendar.JULY:
        case Calendar.AUGUST:
        case Calendar.OCTOBER:
        case Calendar.DECEMBER:
            return 31;
        case Calendar.APRIL:
        case Calendar.JUNE:
        case Calendar.SEPTEMBER:
        case Calendar.NOVEMBER:
            return 30;
        case Calendar.FEBRUARY:
            return (year % 4 == 0) ? 29 : 28;
        default:
            throw new IllegalArgumentException("Invalid Month");
    }
}
 
Example 5
Source Project: whyline   File: Util.java    License: MIT License 6 votes vote down vote up
public static String getMonthString(int month) {
	
	switch(month) {
	case Calendar.JANUARY : return "January";
	case Calendar.FEBRUARY : return "February";
	case Calendar.MARCH : return "March";
	case Calendar.APRIL : return "April";
	case Calendar.MAY : return "May";
	case Calendar.JUNE : return "June";
	case Calendar.JULY : return "July";
	case Calendar.AUGUST : return "August";
	case Calendar.SEPTEMBER : return "September";
	case Calendar.OCTOBER : return "October";
	case Calendar.NOVEMBER : return "November";
	case Calendar.DECEMBER : return "December";
	default : return "invalid month";
}

}
 
Example 6
Source Project: DateTimepicker   File: Utils.java    License: Apache License 2.0 6 votes vote down vote up
public static int getDaysInMonth(int month, int year) {
    switch (month) {
        case Calendar.JANUARY:
        case Calendar.MARCH:
        case Calendar.MAY:
        case Calendar.JULY:
        case Calendar.AUGUST:
        case Calendar.OCTOBER:
        case Calendar.DECEMBER:
            return 31;
        case Calendar.APRIL:
        case Calendar.JUNE:
        case Calendar.SEPTEMBER:
        case Calendar.NOVEMBER:
            return 30;
        case Calendar.FEBRUARY:
            return (year % 4 == 0) ? 29 : 28;
        default:
            throw new IllegalArgumentException("Invalid Month");
    }
}
 
Example 7
Source Project: StyleableDateTimePicker   File: Utils.java    License: MIT License 6 votes vote down vote up
public static int getDaysInMonth(int month, int year) {
    switch (month) {
        case Calendar.JANUARY:
        case Calendar.MARCH:
        case Calendar.MAY:
        case Calendar.JULY:
        case Calendar.AUGUST:
        case Calendar.OCTOBER:
        case Calendar.DECEMBER:
            return 31;
        case Calendar.APRIL:
        case Calendar.JUNE:
        case Calendar.SEPTEMBER:
        case Calendar.NOVEMBER:
            return 30;
        case Calendar.FEBRUARY:
            return (year % 4 == 0) ? 29 : 28;
        default:
            throw new IllegalArgumentException("Invalid Month");
    }
}
 
Example 8
Source Project: Conquer   File: Utils.java    License: Apache License 2.0 6 votes vote down vote up
public static int getDaysInMonth(int month, int year) {
       switch (month) {
           case Calendar.JANUARY:
           case Calendar.MARCH:
           case Calendar.MAY:
           case Calendar.JULY:
           case Calendar.AUGUST:
           case Calendar.OCTOBER:
           case Calendar.DECEMBER:
               return 31;
           case Calendar.APRIL:
           case Calendar.JUNE:
           case Calendar.SEPTEMBER:
           case Calendar.NOVEMBER:
               return 30;
           case Calendar.FEBRUARY:
               return (year % 4 == 0) ? 29 : 28;
           default:
               throw new IllegalArgumentException("Invalid Month");
       }
}
 
Example 9
private int getMonthInCalendar(ChoiceValue<WesternmonthsChoiceDefinition> month) {
	if (month.equals(WesternmonthsChoiceDefinition.get().M01))
		return Calendar.JANUARY;
	if (month.equals(WesternmonthsChoiceDefinition.get().M02))
		return Calendar.FEBRUARY;
	if (month.equals(WesternmonthsChoiceDefinition.get().M03))
		return Calendar.MARCH;
	if (month.equals(WesternmonthsChoiceDefinition.get().M04))
		return Calendar.APRIL;
	if (month.equals(WesternmonthsChoiceDefinition.get().M05))
		return Calendar.MAY;
	if (month.equals(WesternmonthsChoiceDefinition.get().M06))
		return Calendar.JUNE;
	if (month.equals(WesternmonthsChoiceDefinition.get().M07))
		return Calendar.JULY;
	if (month.equals(WesternmonthsChoiceDefinition.get().M08))
		return Calendar.AUGUST;
	if (month.equals(WesternmonthsChoiceDefinition.get().M09))
		return Calendar.SEPTEMBER;
	if (month.equals(WesternmonthsChoiceDefinition.get().M10))
		return Calendar.OCTOBER;
	if (month.equals(WesternmonthsChoiceDefinition.get().M11))
		return Calendar.NOVEMBER;
	if (month.equals(WesternmonthsChoiceDefinition.get().M12))
		return Calendar.DECEMBER;

	return -1;

}
 
Example 10
Source Project: travelguide   File: HttpDateTime.java    License: Apache License 2.0 5 votes vote down vote up
private static int getMonth(String monthString) {
    int hash = Character.toLowerCase(monthString.charAt(0)) +
            Character.toLowerCase(monthString.charAt(1)) +
            Character.toLowerCase(monthString.charAt(2)) - 3 * 'a';
    switch (hash) {
        case 22:
            return Calendar.JANUARY;
        case 10:
            return Calendar.FEBRUARY;
        case 29:
            return Calendar.MARCH;
        case 32:
            return Calendar.APRIL;
        case 36:
            return Calendar.MAY;
        case 42:
            return Calendar.JUNE;
        case 40:
            return Calendar.JULY;
        case 26:
            return Calendar.AUGUST;
        case 37:
            return Calendar.SEPTEMBER;
        case 35:
            return Calendar.OCTOBER;
        case 48:
            return Calendar.NOVEMBER;
        case 9:
            return Calendar.DECEMBER;
        default:
            throw new IllegalArgumentException();
    }
}
 
Example 11
public String getMonthString() {
	int w = getMonth();
	StringBuilder s = new StringBuilder();
	if (w == Calendar.JANUARY)
		s.append("Jan");
	else if (w == Calendar.FEBRUARY)
		s.append("Feb");
	else if (w == Calendar.MARCH)
		s.append("Mar");
	else if (w == Calendar.APRIL)
		s.append("Apr");
	else if (w == Calendar.MAY)
		s.append("May");
	else if (w == Calendar.JUNE)
		s.append("Jun");
	else if (w == Calendar.JULY)
		s.append("Jul");
	else if (w == Calendar.AUGUST)
		s.append("Aug");
	else if (w == Calendar.SEPTEMBER)
		s.append("Sep");
	else if (w == Calendar.OCTOBER)
		s.append("Oct");
	else if (w == Calendar.NOVEMBER)
		s.append("Nov");
	else if (w == Calendar.DECEMBER)
		s.append("Dec");
	return s.toString();
}
 
Example 12
public final void testGetCurrentFiscalYear() {
    int currentFiscalYearAccordingToUniversityDateService = SpringContext.getBean(UniversityDateService.class).getCurrentFiscalYear();
    Calendar today = SpringContext.getBean(DateTimeService.class).getCurrentCalendar();
    int currentFiscalYearAccordingToTest = today.get(Calendar.YEAR);
    if (today.get(Calendar.MONTH) >= Calendar.JULY) {
        currentFiscalYearAccordingToTest++;
    }
    assertEquals("Test expected: " + currentFiscalYearAccordingToTest + ", but UniversityDateService said: " + currentFiscalYearAccordingToUniversityDateService, currentFiscalYearAccordingToTest, currentFiscalYearAccordingToUniversityDateService);
}
 
Example 13
Source Project: play-apk-expansion   File: HttpDateTime.java    License: Apache License 2.0 5 votes vote down vote up
private static int getMonth(String monthString) {
    int hash = Character.toLowerCase(monthString.charAt(0)) +
            Character.toLowerCase(monthString.charAt(1)) +
            Character.toLowerCase(monthString.charAt(2)) - 3 * 'a';
    switch (hash) {
        case 22:
            return Calendar.JANUARY;
        case 10:
            return Calendar.FEBRUARY;
        case 29:
            return Calendar.MARCH;
        case 32:
            return Calendar.APRIL;
        case 36:
            return Calendar.MAY;
        case 42:
            return Calendar.JUNE;
        case 40:
            return Calendar.JULY;
        case 26:
            return Calendar.AUGUST;
        case 37:
            return Calendar.SEPTEMBER;
        case 35:
            return Calendar.OCTOBER;
        case 48:
            return Calendar.NOVEMBER;
        case 9:
            return Calendar.DECEMBER;
        default:
            throw new IllegalArgumentException();
    }
}
 
Example 14
Source Project: roncoo-pay   File: DateUtils.java    License: Apache License 2.0 5 votes vote down vote up
/**
 *
 * 1 第一季度 2 第二季度 3 第三季度 4 第四季度
 *
 * @param date
 * @return
 */
public static int getSeason(Date date) {

	int season = 0;

	Calendar c = Calendar.getInstance();
	c.setTime(date);
	int month = c.get(Calendar.MONTH);
	switch (month) {
	case Calendar.JANUARY:
	case Calendar.FEBRUARY:
	case Calendar.MARCH:
		season = 1;
		break;
	case Calendar.APRIL:
	case Calendar.MAY:
	case Calendar.JUNE:
		season = 2;
		break;
	case Calendar.JULY:
	case Calendar.AUGUST:
	case Calendar.SEPTEMBER:
		season = 3;
		break;
	case Calendar.OCTOBER:
	case Calendar.NOVEMBER:
	case Calendar.DECEMBER:
		season = 4;
		break;
	default:
		break;
	}
	return season;
}
 
Example 15
Source Project: Travel-Mate   File: UpcomingWeekendsActivity.java    License: MIT License 5 votes vote down vote up
private int getMonthByString(String month) {
    switch (month) {
        case "January":
            return Calendar.JANUARY;
        case "February":
            return Calendar.FEBRUARY;
        case "March":
            return Calendar.MARCH;
        case "April":
            return Calendar.APRIL;
        case "May":
            return Calendar.MAY;
        case "June":
            return Calendar.JUNE;
        case "July":
            return Calendar.JULY;
        case "August":
            return Calendar.AUGUST;
        case "September":
            return Calendar.SEPTEMBER;
        case "October":
            return Calendar.OCTOBER;
        case "November":
            return Calendar.NOVEMBER;
        case "December":
            return Calendar.DECEMBER;
    }
    return -1;
}
 
Example 16
private boolean easterDay() {
    int year = new Date().getYear();
    int a = year % 19,
            b = year / 100,
            c = year % 100,
            d = b / 4,
            e = b % 4,
            g = (8 * b + 13) / 25,
            h = (19 * a + b - d - g + 15) % 30,
            j = c / 4,
            k = c % 4,
            m = (a + 11 * h) / 319,
            r = (2 * e + 2 * j - k - h + m + 32) % 7,
            n = (h - m + r + 90) / 25,
            p = (h - m + r + n + 19) % 32;

    int result;
    switch (n) {
        case 1:
            result = Calendar.JANUARY;
            break;
        case 2:
            result = Calendar.FEBRUARY;
            break;
        case 3:
            result = Calendar.MARCH;
            break;
        case 4:
            result = Calendar.APRIL;
            break;
        case 5:
            result = Calendar.MAY;
            break;
        case 6:
            result = Calendar.JUNE;
            break;
        case 7:
            result = Calendar.JULY;
            break;
        case 8:
            result = Calendar.AUGUST;
            break;
        case 9:
            result = Calendar.SEPTEMBER;
            break;
        case 10:
            result = Calendar.OCTOBER;
            break;
        case 11:
            result = Calendar.NOVEMBER;
            break;
        case 12:
            result = Calendar.DECEMBER;
            break;
        default:
            throw new IllegalStateException("Unexpected value: " + n);
    }
    Date eaterDay = new Date(year, result, p);
    Date currentDate = new Date(System.currentTimeMillis());
    if (currentDate.getYear() == eaterDay.getYear()) {
        if (currentDate.getMonth() == eaterDay.getMonth()) {
            return currentDate.getDay() == eaterDay.getDay();
        }
    }
    return false;
}
 
Example 17
/**
 * 
 * @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionPositionBaseYear(java.lang.Integer)
 */
public void buildBudgetConstructionPositionBaseYear(Integer baseFiscalYear) {
    StringBuilder sqlBuilder = new StringBuilder(2000);
    String defaultRCCd = new String("--");
    /**
     *  we have to do this because imbedding a constant string in SQL assumes a string delimiter--that can vary with the DBMS 
     */
    String orgSeparator = new String("-");
    GregorianCalendar calendarJuly1 = new GregorianCalendar(baseFiscalYear, Calendar.JULY, 1);
    Date julyFirst = new Date(calendarJuly1.getTimeInMillis());
    /**
     * first, delete everything for the base year--we will refresh it in case the position has changed
     */
    sqlBuilder.append("DELETE FROM LD_BCN_POS_T\n");
    sqlBuilder.append("WHERE (UNIV_FISCAL_YR = ?)\n");
    sqlBuilder.append("  AND (EXISTS (SELECT 1\n"); 
    sqlBuilder.append("               FROM LD_CSF_TRACKER_T\n"); 
    sqlBuilder.append("               WHERE (LD_CSF_TRACKER_T.UNIV_FISCAL_YR = ?)\n");
    sqlBuilder.append("                 AND (LD_CSF_TRACKER_T.POSITION_NBR = LD_BCN_POS_T.POSITION_NBR)\n");
    sqlBuilder.append("                 AND (LD_CSF_TRACKER_T.POS_CSF_DELETE_CD = ?)))\n");
    String sqlString = sqlBuilder.toString();
    getSimpleJdbcTemplate().update(sqlString,baseFiscalYear,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE);
    sqlBuilder.delete(0, sqlBuilder.length());
    /**
     * re-create the base year position data
     * we take the latest position that is active BEFORE the coming fiscal year
     */
    sqlBuilder.append("INSERT INTO LD_BCN_POS_T\n");
    sqlBuilder.append("(POSITION_NBR, UNIV_FISCAL_YR, POS_EFFDT, POS_EFF_STATUS, POSN_STATUS,\n");
    sqlBuilder.append(" BUDGETED_POSN, CONFIDENTIAL_POSN, POS_STD_HRS_DFLT, POS_REG_TEMP, POS_FTE, POS_DESCR, SETID_DEPT, POS_DEPTID,\n"); 
    sqlBuilder.append(" RC_CD, POS_SAL_PLAN_DFLT, POS_GRADE_DFLT, SETID_JOBCODE, JOBCODE, SETID_SALARY,\n");
    sqlBuilder.append(" POS_LOCK_USR_ID)\n");
    sqlBuilder.append("(SELECT px.POSITION_NBR,\n");
    sqlBuilder.append("        ?, px.EFFDT, px.POS_EFF_STATUS,\n");
    sqlBuilder.append("        px.POSN_STATUS, px.BUDGETED_POSN, 'N',\n");
    sqlBuilder.append("        px.STD_HRS_DEFAULT, px.POS_REG_TEMP, px.POS_FTE, px.DESCR, px.BUSINESS_UNIT,\n");
    sqlBuilder.append("        px.DEPTID, COALESCE(org.RC_CD,?),\n");
    sqlBuilder.append("        px.POS_SAL_PLAN_DFLT, px.POS_GRADE_DFLT, px.BUSINESS_UNIT, px.JOBCODE,\n");
    sqlBuilder.append("        px.BUSINESS_UNIT, ?\n");
    sqlBuilder.append(" FROM PS_POSITION_DATA px LEFT OUTER JOIN LD_BCN_ORG_RPTS_T org\n"); 
    sqlBuilder.append("      ON (CONCAT(CONCAT(org.FIN_COA_CD,?),org.ORG_CD) = px.DEPTID)\n");
    sqlBuilder.append(" WHERE (px.EFFDT < ?)\n");
    sqlBuilder.append("   AND (NOT EXISTS (SELECT 1\n");
    sqlBuilder.append("                    FROM LD_BCN_POS_T\n");
    sqlBuilder.append("                    WHERE (LD_BCN_POS_T.UNIV_FISCAL_YR = ?)\n");
    sqlBuilder.append("                      AND (px.POSITION_NBR = LD_BCN_POS_T.POSITION_NBR)))\n");
    sqlBuilder.append("   AND (NOT EXISTS (SELECT 1\n");
    sqlBuilder.append("                    FROM PS_POSITION_DATA py\n");
    sqlBuilder.append("                    WHERE (px.POSITION_NBR = py.POSITION_NBR)\n");
    sqlBuilder.append("                      AND (py.EFFDT < ?)\n");
    sqlBuilder.append("                      AND (px.EFFDT < py.EFFDT)))\n");
    sqlBuilder.append("   AND (EXISTS (SELECT 1\n");
    sqlBuilder.append("                FROM LD_CSF_TRACKER_T csf\n");
    sqlBuilder.append("                WHERE (csf.UNIV_FISCAL_YR = ?)\n");
    sqlBuilder.append("                  AND (csf.POS_CSF_DELETE_CD = ?)\n");
    sqlBuilder.append("                  AND (csf.POSITION_NBR = px.POSITION_NBR))))\n");
    sqlString = sqlBuilder.toString();
    getSimpleJdbcTemplate().update(sqlString,baseFiscalYear,defaultRCCd,BCConstants.DEFAULT_BUDGET_HEADER_LOCK_IDS,orgSeparator,julyFirst,baseFiscalYear,julyFirst,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE);
    // set the things that we'll need for testing but which we don't have enough information to set from the Kuali DB
    // this code is obviously somewhat arbitrary--it should be replaced with institution-specific algorithms
    setAcademicDefaultObjectClass(baseFiscalYear);
    setMonthlyStaffOvertimeEligibleDefaultObjectClass(baseFiscalYear);
    setMonthlyStaffOvertimeExemptDefaultObjectClass(baseFiscalYear);
    setBiweeklyStaffDefaultObjectClass(baseFiscalYear);
}
 
Example 18
Source Project: android-utils   File: DateUtils.java    License: MIT License 4 votes vote down vote up
/**
 * Gets abbreviated name of the month from the given date.
 *
 * @param date ISO format date
 * @return Returns the name of the month
 */
public static String getMonthAbbreviated(String date) {
    Date dateDT = parseDate(date);

    if (dateDT == null) {
        return null;
    }

    // Get current date
    Calendar c = Calendar.getInstance();
    // it is very important to
    // set the date of
    // the calendar.
    c.setTime(dateDT);
    int day = c.get(Calendar.MONTH);

    String dayStr = null;

    switch (day) {

        case Calendar.JANUARY:
            dayStr = "Jan";
            break;

        case Calendar.FEBRUARY:
            dayStr = "Feb";
            break;

        case Calendar.MARCH:
            dayStr = "Mar";
            break;

        case Calendar.APRIL:
            dayStr = "Apr";
            break;

        case Calendar.MAY:
            dayStr = "May";
            break;

        case Calendar.JUNE:
            dayStr = "Jun";
            break;

        case Calendar.JULY:
            dayStr = "Jul";
            break;

        case Calendar.AUGUST:
            dayStr = "Aug";
            break;

        case Calendar.SEPTEMBER:
            dayStr = "Sep";
            break;

        case Calendar.OCTOBER:
            dayStr = "Oct";
            break;

        case Calendar.NOVEMBER:
            dayStr = "Nov";
            break;

        case Calendar.DECEMBER:
            dayStr = "Dec";
            break;
    }

    return dayStr;
}
 
Example 19
Source Project: Birdays   File: AllFragment.java    License: Apache License 2.0 4 votes vote down vote up
private Separator getSeparator(Person person) {
    Separator separator = null;
    switch (person.getMonth()) {
        case Calendar.JANUARY:
            if (!adapter.containsSeparatorJanuary) {
                adapter.containsSeparatorJanuary = true;
                separator = new Separator(Separator.TYPE_JANUARY);
            }
            break;
        case Calendar.FEBRUARY:
            if (!adapter.containsSeparatorFebruary) {
                adapter.containsSeparatorFebruary = true;
                separator = new Separator(Separator.TYPE_FEBRUARY);
            }
            break;
        case Calendar.MARCH:
            if (!adapter.containsSeparatorMarch) {
                adapter.containsSeparatorMarch = true;
                separator = new Separator(Separator.TYPE_MARCH);
            }
            break;
        case Calendar.APRIL:
            if (!adapter.containsSeparatorApril) {
                adapter.containsSeparatorApril = true;
                separator = new Separator(Separator.TYPE_APRIL);
            }
            break;
        case Calendar.MAY:
            if (!adapter.containsSeparatorMay) {
                adapter.containsSeparatorMay = true;
                separator = new Separator(Separator.TYPE_MAY);
            }
            break;
        case Calendar.JUNE:
            if (!adapter.containsSeparatorJune) {
                adapter.containsSeparatorJune = true;
                separator = new Separator(Separator.TYPE_JUNE);
            }
            break;
        case Calendar.JULY:
            if (!adapter.containsSeparatorJuly) {
                adapter.containsSeparatorJuly = true;
                separator = new Separator(Separator.TYPE_JULY);
            }
            break;
        case Calendar.AUGUST:
            if (!adapter.containsSeparatorAugust) {
                adapter.containsSeparatorAugust = true;
                separator = new Separator(Separator.TYPE_AUGUST);
            }
            break;
        case Calendar.SEPTEMBER:
            if (!adapter.containsSeparatorSeptember) {
                adapter.containsSeparatorSeptember = true;
                separator = new Separator(Separator.TYPE_SEPTEMBER);
            }
            break;
        case Calendar.OCTOBER:
            if (!adapter.containsSeparatorOctober) {
                adapter.containsSeparatorOctober = true;
                separator = new Separator(Separator.TYPE_OCTOBER);
            }
            break;
        case Calendar.NOVEMBER:
            if (!adapter.containsSeparatorNovember) {
                adapter.containsSeparatorNovember = true;
                separator = new Separator(Separator.TYPE_NOVEMBER);
            }
            break;
        case Calendar.DECEMBER:
            if (!adapter.containsSeparatorDecember) {
                adapter.containsSeparatorDecember = true;
                separator = new Separator(Separator.TYPE_DECEMBER);
            }
            break;
    }
    return separator;
}
 
Example 20
@Override
public int getBaseMonth()
{
    return Calendar.JULY;
}