Java Code Examples for java.util.Calendar#JULY

The following examples show how to use java.util.Calendar#JULY . 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 check out the related API usage on the sidebar.
Example 1
Source File: Utils.java    From Conquer with 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 File: Utils.java    From StyleableDateTimePicker with 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 3
Source File: CalendarUtils.java    From UltimateAndroid with 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 4
Source File: Utils.java    From cathode with 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 5
Source File: AppCompatDatePickerDelegate.java    From AppCompat-Extension-Library with 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 6
Source File: DateUtils.java    From CustomizableCalendar with 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 7
Source File: Util.java    From whyline with 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 8
Source File: Utils.java    From DateTimepicker with 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
Source File: HttpDateTime.java    From travelguide with 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 10
Source File: UpcomingWeekendsActivity.java    From Travel-Mate with 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 11
Source File: DateUtils.java    From roncoo-pay with 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 12
Source File: HttpDateTime.java    From play-apk-expansion with 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 13
Source File: UniversityDateServiceTest.java    From kfs with GNU Affero General Public License v3.0 5 votes vote down vote up
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 14
Source File: EarthClock.java    From mars-sim with GNU General Public License v3.0 5 votes vote down vote up
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 15
Source File: WorkCalendarHelper.java    From Open-Lowcode with Eclipse Public License 2.0 5 votes vote down vote up
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 16
Source File: DateUtils.java    From android-utils with 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 17
Source File: BudgetConstructionHumanResourcesPayrollInterfaceDaoJdbc.java    From kfs with GNU Affero General Public License v3.0 4 votes vote down vote up
/**
 * 
 * @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 File: FunnyEasterEgg.java    From QuickShop-Reremake with GNU General Public License v3.0 4 votes vote down vote up
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 19
Source File: AllFragment.java    From Birdays with 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
Source File: FinancialJulyPeriodType.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public int getBaseMonth()
{
    return Calendar.JULY;
}