List of utility methods to do Weekend Count
int | countWeekend(String startDate, String endDate) count Weekend int result = 0; Date sdate = null; if (startDate.indexOf("/") > 0 && endDate.indexOf("/") > 0) { sdate = getDateObj(startDate, "/"); if (startDate.indexOf("-") > 0 && endDate.indexOf("-") > 0) { sdate = getDateObj(startDate, "-"); int sumDays = Math.abs(getDiffDays(startDate, endDate)); int dayOfWeek = 0; for (int i = 0; i <= sumDays; i++) { dayOfWeek = getDayOfWeek(getDateAdd(sdate, i)); if (dayOfWeek == 1 || dayOfWeek == 7) { result++; return result; |
int | countWeekend(String startDate, String endDate) count Weekend int result = 0; Date sdate = null; Date edate = null; if (startDate.indexOf("/") > 0 && endDate.indexOf("/") > 0) { sdate = getDateObj(startDate, "/"); edate = getDateObj(endDate, "/"); if (startDate.indexOf("-") > 0 && endDate.indexOf("-") > 0) { ... |