public function nbd(Carbon $dt = NULL) {

		if (($dt instanceof Carbon) == FALSE) {
			$dt = new Carbon();
		}

		if ($this->deadline()) {
			if ($this->deadline()->lt($dt)) {
				$dt->addDay();
			}
		} else {
			$dt->addDay();
		}

		/* Time becomes irrelevant */
		$dt->setTime(0,0,0);

		$iters = 0;
		
		while ($this->isExcluded($dt)) {
			
			if ($iters == static::$N_MAX_ITER) {
				throw new \RuntimeException('Maximum iterations met for next business day calculation');
			}
			
			$dt->addDay();
			$iters++;
		}

		return $dt;
	}
public function nbd(Carbon $dt = NULL) {

		if (($dt instanceof Carbon) == FALSE) {
			$dt = new Carbon();
		}

		if ($this->deadline()) {
			if ($this->deadline()->lt($dt)) {
				$dt->addDay();
			}
		} else {
			$dt->addDay();
		}

		/* Time becomes irrelevant */
		$dt->setTime(0,0,0);

		$iters = 0;
		
		while ($this->isExcluded($dt)) {
			
			if ($iters == static::$N_MAX_ITER) {
				throw new \RuntimeException('Maximum iterations met for next business day calculation');
			}
			
			$dt->addDay();
			$iters++;
		}

		return $dt;
	}
public function nbd ( Carbon $ dt = NULL ) { if ( ( $ dt instanceof Carbon ) == FALSE ) { $ dt = new Carbon ( ) ; } if ( $ this -> deadline ( ) ) { if ( $ this -> deadline ( ) -> lt ( $ dt ) ) { $ dt -> addDay ( ) ; } } else { $ dt -> addDay ( ) ; } /* Time becomes irrelevant */ $ dt -> setTime ( 0 , 0 , 0 ) ; $ iters = 0 ; while ( $ this -> isExcluded ( $ dt ) ) { if ( $ iters == static :: $ N_MAX_ITER ) { throw new \ RuntimeException ( 'Maximum iterations met for next business day calculation' ) ; } $ dt -> addDay ( ) ; $ iters ++ ; } return $ dt ; }
Determine the next business day

@param Carbon $dt Day to check

@throws \RuntimeException
@return Carbon Next business day (DATE ONLY, times will be zeroed out)
Determine the next business day