Android Utililty Methods Weekend Count

List of utility methods to do Weekend Count

Description

The list of methods to do Weekend Count are organized into topic(s).

Method

intcountWeekend(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;
intcountWeekend(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) {
...