public function containsDate($date): bool
    {
        $date = Date::castFrom($date);
        if (!$this->start->isBefore($date) && !$this->start->equals($date)) {
            return false;
        }

        if (!$this->end->isAfter($date) && !$this->end->equals($date)) {
            return false;
        }

        return true;
    }
public function containsDate($date): bool
    {
        $date = Date::castFrom($date);
        if (!$this->start->isBefore($date) && !$this->start->equals($date)) {
            return false;
        }

        if (!$this->end->isAfter($date) && !$this->end->equals($date)) {
            return false;
        }

        return true;
    }
public function containsDate ( $ date ) : bool { $ date = Date :: castFrom ( $ date ) ; if ( ! $ this -> start -> isBefore ( $ date ) && ! $ this -> start -> equals ( $ date ) ) { return false ; } if ( ! $ this -> end -> isAfter ( $ date ) && ! $ this -> end -> equals ( $ date ) ) { return false ; } return true ; }
checks whether the span contains the given date

@param   int|string|\DateTime|\stubbles\date\Date  $date
@return  bool
checks whether the span contains the given date