List of utility methods to do Day in Month Get
int | getDaysInMonth(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: ... |
int | daysInMonth(int day, int month, int year) days In Month return new GregorianCalendar(year, month, day) .getActualMaximum(Calendar.DAY_OF_MONTH); |
int | getDaysInMonth(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: ... |
int | getNextMonthDays(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]) ... |
int | daysInMonth(Calendar c) days In Month return daysInMonth(c.get(Calendar.DATE), c.get(Calendar.MONTH),
c.get(Calendar.YEAR));
|
int | getNextMonthDays(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( ... |
int | perMonthDays(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: ... |
int | numDaysToEndOfMonth() num Days To End Of Month return maxMonthDate(new Date()) - dayNumber(new Date()); |
int | dayNumber(Date date) day Number Calendar calender = calendarDate(date);
return calender.get(Calendar.DAY_OF_MONTH);
|
int | getDayOfWeek(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; |