Checks if the entered date is valid with respect to the valid end date

@return boolean true if the entered date is before the valid end date
and false if the entered date is on or after the valid
end date.
196241
protected function isEndDateValid()
    {
        $this->valid_range_end->setTZById('UTC');
        return SwatDate::compare($this->value, $this->valid_range_end, true) <
            0;
    }
120851
def valid(self):
        
        if self.end is None:
            return True
        else:
            return datetime.datetime.utcnow() <= self.end
954204
public function isValid()
    {
        return ((!empty($this->hex) && ctype_xdigit($this->hex)) && (!empty($this->dec) && ctype_digit($this->dec)));
    }
422056
public function isDatesValid()
    {
        if ($this->startDate >= $this->endDate) {
            return false;
        }

        return ($this->endDate->diff($this->startDate)->days > 0);
    }
522532
public function isOpen() {
		if (empty($this->close_date)) {
			// There is no closing date so this poll is always open
			return true;
		}

		$now = time();

		// input/date saves beginning of day and we want to include closing date day in poll
		$deadline = $this->close_date + 86400;

		return $deadline > $now;
	}
713339
private function validateDateTime(): bool
    {
        if ($this->value instanceof \DateTime) {
            return true;
        }

        if (\is_string($this->value) && $this->options['format'] === null) {
            throw new InvalidArgumentException('"format" option has to be provided');
        }

        \is_float($this->value) || \is_int($this->value)
            ? new \DateTime("@$this->value")
            : \DateTime::createFromFormat($this->options['format'], $this->value);

        $errors = \DateTime::getLastErrors();
        if ($errors['warning_count'] === 0 && $errors['error_count'] === 0) {
            return true;
        }

        $this->setError(self::VALIDATOR_ERROR_DATETIME_NOT_VALID);
        return false;
    }
992369
public function valid()
    {
		if ($this->dontUsePaging || !$this->itemCountPerPage)
		{		
			return $this->position >= 0 && $this->position < count($this->getElements());
		}
		if ($this->position < 0) return false;
		if ($this->itemCountPerPage && $this->position >= $this->itemCountPerPage) return false;
		if ($this->getPosition() >= count($this->getElements())) return false;
		return true;
    }
1284950
public function valid()
	{
		if(!isset($this->lines[$this->position])){
			return false;
		}
		if(count($this->lines[$this->position])===0){
			return false;
		}
		return true;
	}
303365
final public function valid()
    {
        if ($this->position === -1) {
            $this->next();
        }

        return $this->offset + $this->position < $this->total;
    }
559354
def __validate_dates(start_date, end_date):
    
    try:
        start_date = datetime.datetime.strptime(start_date, '%Y-%m-%d')
        end_date = datetime.datetime.strptime(end_date, '%Y-%m-%d')
    except ValueError:
        raise ValueError("Incorrect data format, should be yyyy-mm-dd")
    if (end_date - start_date).days > 366:
        raise ValueError("The difference between start and end date " +
                         "should be less than or equal to 366 days.")
    if (end_date - start_date).days < 0:
        raise ValueError("End date cannot be before start date.")
742540
protected final boolean isDurationValid() {

        if (isValidEndTypeForPattern()) {
            switch (getEndType()) {
                case DATE:
                    return (getStart().getTime() < (getSeriesEndDate().getTime() + DAY_IN_MILLIS));
                case TIMES:
                    return getOccurrences() > 0;
                case SINGLE:
                    return true;
                default:
                    return false;
            }
        } else {
            return false;
        }
    }
694658
private function validateGreaterThan(): bool
    {
        if ($this->options['min'] !== null) {
            if ($this->options['inclusive'] === false && $this->value <= $this->options['min']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_HIGHER_THAN_MIN);
                return false;
            }

            if ($this->value < $this->options['min']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_HIGHER_OR_EQUAL_TO_MIN);
                return false;
            }
        }
        return true;
    }
151138
public function valid()
    {

        $allowed_values = $this->getInputAllowableValues();
        if (!in_array($this->container['input'], $allowed_values)) {
            return false;
        }
        return true;
    }
631318
public function valid() {
        if (!isset($this->za)) {
            return false;
        }

        // Skip over unwanted system files (get_info will return false).
        while (!$this->get_info($this->pos) && $this->pos < $this->za->numFiles) {
            $this->next();
        }

        // No files left - we're at the end.
        if ($this->pos >= $this->za->numFiles) {
            return false;
        }

        return true;
    }
252518
public function getDateValidationRule()
    {
        if ($this->isDateOrTime()) {
            if (!empty($this->dateFormat)) {
                return sprintf('date_format:%s', $this->dateFormat);
            }

            return 'date';
        }

        return null;
    }
1266758
public function valid()
    {
        $key = isset($this->items[$this->pos]) ? $this->items[$this->pos] : null;
        return ($key !== null && $key !== false);
    }
1247891
public function isValid(): bool
    {
        return $this->result_code === ResponseInterface::RESULT_OK
            || $this->result_code === ResponseInterface::RESULT_RECEIPT_VALID_BUT_SUB_EXPIRED;
    }