Android Utililty Methods Month Date Get

List of utility methods to do Month Date Get

Description

The list of methods to do Month Date Get are organized into topic(s).

Method

intgetCurrentMonth(Date date)
get Current Month
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
return calendar.get(Calendar.MONTH) + 1;
intmonthNumber(Date date)
month Number
Calendar calendar = calendarDate(date);
return calendar.get(Calendar.MONTH);
intmaxMonthDate(Date date)
max Month Date
Calendar calendar = calendarDate(date);
return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
DategetMonthStartDate(Date date)
get Month Start Date
Calendar calendar = calendarDate(date);
calendar.set(Calendar.DAY_OF_MONTH,
        calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
Date startDate = calendar.getTime();
return startDate;
DategetMonthEndDate(Date date)
get Month End Date
Calendar calendar = calendarDate(date);
calendar.set(Calendar.DAY_OF_MONTH,
        calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
Date endDate = calendar.getTime();
return endDate;
intgetCurrentMonth()
Gets the month element from today date.
return getMonthFromDate(new Date());
intmonthNumber()
month Number
return monthNumber(new Date());
intgetInterval(String beginMonth, String endMonth)
get Interval
int intBeginYear = Integer.parseInt(beginMonth.substring(0, 4));
int intBeginMonth = Integer.parseInt(beginMonth
        .substring(beginMonth.indexOf("-") + 1));
int intEndYear = Integer.parseInt(endMonth.substring(0, 4));
int intEndMonth = Integer.parseInt(endMonth.substring(endMonth
        .indexOf("-") + 1));
return ((intEndYear - intBeginYear) * 12)
        + (intEndMonth - intBeginMonth) + 1;
...
DatemonthOffset(Date date, int offset)
month Offset
return offsetDate(date, Calendar.MONTH, offset);
intgetMonth()
get Month
return Calendar.getInstance().get(Calendar.MONTH);