public static function getNextRecurring($strWeekdayAll,$strWeekdayA,$strWeekdayB,$blnHolidays = false) {
		$arrDates = static::getCalRecurring($strWeekdayAll,$strWeekdayA,$strWeekdayB,$blnHolidays);

		foreach($arrDates as $i => $strDate) {
			if(time() > strtotime($arrDates[$i-1]) && time() < strtotime($arrDates[$i])) {
				return $strDate;
			}
		}
		#try next year if none found:
		$arrDates = static::getCalRecurring($strWeekdayAll,$strWeekdayA,$strWeekdayB,$blnHolidays, static::schoolYearId(static::schoolYearAtTime(strtotime('now +1 year'))));
		foreach($arrDates as $i => $strDate) {
			if(time() > strtotime($arrDates[$i-1]) && time() < strtotime($arrDates[$i])) {
				return $strDate;
			}
		}
		return false;
	}
public static function getNextRecurring($strWeekdayAll,$strWeekdayA,$strWeekdayB,$blnHolidays = false) {
		$arrDates = static::getCalRecurring($strWeekdayAll,$strWeekdayA,$strWeekdayB,$blnHolidays);

		foreach($arrDates as $i => $strDate) {
			if(time() > strtotime($arrDates[$i-1]) && time() < strtotime($arrDates[$i])) {
				return $strDate;
			}
		}
		#try next year if none found:
		$arrDates = static::getCalRecurring($strWeekdayAll,$strWeekdayA,$strWeekdayB,$blnHolidays, static::schoolYearId(static::schoolYearAtTime(strtotime('now +1 year'))));
		foreach($arrDates as $i => $strDate) {
			if(time() > strtotime($arrDates[$i-1]) && time() < strtotime($arrDates[$i])) {
				return $strDate;
			}
		}
		return false;
	}
public static function getNextRecurring ( $ strWeekdayAll , $ strWeekdayA , $ strWeekdayB , $ blnHolidays = false ) { $ arrDates = static :: getCalRecurring ( $ strWeekdayAll , $ strWeekdayA , $ strWeekdayB , $ blnHolidays ) ; foreach ( $ arrDates as $ i => $ strDate ) { if ( time ( ) > strtotime ( $ arrDates [ $ i - 1 ] ) && time ( ) < strtotime ( $ arrDates [ $ i ] ) ) { return $ strDate ; } } #try next year if none found: $ arrDates = static :: getCalRecurring ( $ strWeekdayAll , $ strWeekdayA , $ strWeekdayB , $ blnHolidays , static :: schoolYearId ( static :: schoolYearAtTime ( strtotime ( 'now +1 year' ) ) ) ) ; foreach ( $ arrDates as $ i => $ strDate ) { if ( time ( ) > strtotime ( $ arrDates [ $ i - 1 ] ) && time ( ) < strtotime ( $ arrDates [ $ i ] ) ) { return $ strDate ; } } return false ; }
Find next date for a weekly recurring event

@param string $strWeekdayAll | Options: mon,tue,wed,thu,fri,sat,sun,fals
@param string $strWeekdayA | Options: mon,tue,wed,thu,fri,sat,sun,false
@param string $strWeekdayB | Options: mon,tue,wed,thu,fri,sat,sun,false
@param bool $blnHolidays | If true, holidays weeks are also included

@return string date in the format 'Y-m-d'
Find next date for a weekly recurring event