public boolean weekdayRange(String wd1,String wd2,String gmt){
  boolean useGmt=GMT.equalsIgnoreCase(wd2) || GMT.equalsIgnoreCase(gmt);
  Calendar cal=getCurrentTime(useGmt);
  int currentDay=cal.get(Calendar.DAY_OF_WEEK) - 1;
  int from=DAYS.indexOf(wd1 == null ? null : wd1.toUpperCase());
  int to=DAYS.indexOf(wd2 == null ? null : wd2.toUpperCase());
  if (to == -1) {
    to=from;
  }
  if (to < from) {
    return currentDay >= from || currentDay <= to;
  }
 else {
    return currentDay >= from && currentDay <= to;
  }
}

public boolean weekdayRange ( String wd1 , String wd2 , String gmt ) { boolean useGmt = GMT . equalsIgnoreCase ( wd2 ) || GMT . equalsIgnoreCase ( gmt ) ; Calendar cal = getCurrentTime ( useGmt ) ; int currentDay = cal . get ( Calendar . DAY_OF_WEEK ) - 1 ; int from = DAYS . indexOf ( wd1 == null ? null : wd1 . toUpperCase ( ) ) ; int to = DAYS . indexOf ( wd2 == null ? null : wd2 . toUpperCase ( ) ) ; if ( to == - 1 ) { to = from ; } if ( to < from ) { return currentDay >= from || currentDay <= to ; } else { return currentDay >= from && currentDay <= to ; } }
only the first parameter is mandatory . either the second , the third , or both may be left out . if only one parameter is present , the function yields a true value on the weekday that the parameter represents . if the string " gmt " is specified as a second parameter , times are taken to be in gmt , otherwise in local time zone . if both wd1 and wd2 are defined , the condition is true if the current weekday is in between those two weekdays . bounds are inclusive . if the " gmt " parameter is specified , times are taken to be in gmt , otherwise the local time zone is used .
