List of utility methods to do Day in Month
int | getDaysInMonth(int year, int month) get Days In Month if (month == 2) { if ((year % 4) == 0) { return 29; return DAYS_IN_MONTH[month - 1]; |
int[] | getDaysInMonths() get Days In Months return DOM.clone();
|
int | getDaysOfMonth(Date startdate, Date enddate, String month) get Days Of Month Calendar cs = Calendar.getInstance(); cs.setTime(startdate); Calendar ce = Calendar.getInstance(); ce.setTime(enddate); int startmonth = cs.get(Calendar.MONTH) + 1; int endmonth = ce.get(Calendar.MONTH) + 1; int m = Integer.parseInt(month); Date ld = getLastDay(String.valueOf(cs.get(Calendar.YEAR)), month); ... |
String | getFirstDayOfMonth(int year, int month) get first date of given month and year String monthStr = month < 10 ? "0" + month : String.valueOf(month); return year + "-" + monthStr + "-" + "01"; |
String | getFirstdayOfMonth(String year, String month) get Firstday Of Month return year + month + "01"; |
int | getLastDayInMonth(int month, int year) get Last Day In Month int NumberOfDays = 0; switch (month) { case 0: NumberOfDays = 31; break; case 1: if ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0)) { NumberOfDays = 29; ... |
int | getLastDayOfMonth(int year, int month) get Last Day Of Month if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { return 31; if (month == 4 || month == 6 || month == 9 || month == 11) { return 30; if (month == 2) { if (isLeapYear(year)) { ... |
String | getLastDayOfMonth(String monthInitials) get Last Day Of Month if (monthInitials.equals("Jan")) return "31"; else if (monthInitials.equals("Feb")) return "30"; else if (monthInitials.equals("Mar")) return "31"; else if (monthInitials.equals("Apr")) return "30"; ... |
int | getMaxDayByMonth(String month) get Max Day By Month switch (Integer.parseInt(month)) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: ... |
int | getMaxMonthDay(int year, int month) get Max Month Day if (month < 7) { return 31; if (month < 12) { return 30; if (isJalaliLeapYear(year)) { return 30; ... |