Android Utililty Methods Day in Month Get

List of utility methods to do Day in Month Get

Description

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

Method

intgetDaysInMonth(int month, int year)
get Days In Month
switch (month) {
case Calendar.JANUARY:
case Calendar.MARCH:
case Calendar.MAY:
case Calendar.JULY:
case Calendar.AUGUST:
case Calendar.OCTOBER:
case Calendar.DECEMBER:
...
intdaysInMonth(int day, int month, int year)
days In Month
return new GregorianCalendar(year, month, day)
        .getActualMaximum(Calendar.DAY_OF_MONTH);
intgetDaysInMonth(int month, int year)
get Days In Month
switch (month) {
case Calendar.JANUARY:
case Calendar.MARCH:
case Calendar.MAY:
case Calendar.JULY:
case Calendar.AUGUST:
case Calendar.OCTOBER:
case Calendar.DECEMBER:
...
intgetNextMonthDays(String argDate)
get Next Month Days
String[] temp = null;
if (argDate.indexOf("/") > 0) {
    temp = argDate.split("/");
if (argDate.indexOf("-") > 0) {
    temp = argDate.split("-");
Calendar cal = new GregorianCalendar(Integer.valueOf(temp[0])
...
intdaysInMonth(Calendar c)
days In Month
return daysInMonth(c.get(Calendar.DATE), c.get(Calendar.MONTH),
        c.get(Calendar.YEAR));
intgetNextMonthDays(String argDate)
get Next Month Days
String[] temp = null;
if (argDate.indexOf("/") > 0) {
    temp = argDate.split("/");
if (argDate.indexOf("-") > 0) {
    temp = argDate.split("-");
Calendar cal = new GregorianCalendar(
...
intperMonthDays(Calendar cal)
per Month Days
int maxDays = 0;
int month = cal.get(Calendar.MONTH);
switch (month) {
case Calendar.JANUARY:
case Calendar.MARCH:
case Calendar.MAY:
case Calendar.JULY:
case Calendar.AUGUST:
...
intnumDaysToEndOfMonth()
num Days To End Of Month
return maxMonthDate(new Date()) - dayNumber(new Date());
intdayNumber(Date date)
day Number
Calendar calender = calendarDate(date);
return calender.get(Calendar.DAY_OF_MONTH);
intgetDayOfWeek(long time)
get Day Of Week
calendar.clear();
calendar.setTimeInMillis(time);
int result = calendar.get(Calendar.DAY_OF_WEEK) - 1;
if (result <= 0) {
    result = 7;
return result;