public function valid()
    {
        if (null === $this->currentDate) {
            return false;
        }
        if (!is_null($this->count)) {
            return $this->counter < $this->count;
        }

        return is_null($this->until) || $this->currentDate <= $this->until;
    }
public function valid()
    {
        if (null === $this->currentDate) {
            return false;
        }
        if (!is_null($this->count)) {
            return $this->counter < $this->count;
        }

        return is_null($this->until) || $this->currentDate <= $this->until;
    }
public function valid ( ) { if ( null === $ this -> currentDate ) { return false ; } if ( ! is_null ( $ this -> count ) ) { return $ this -> counter < $ this -> count ; } return is_null ( $ this -> until ) || $ this -> currentDate <= $ this -> until ; }
Returns whether the current item is a valid item for the recurrence
iterator. This will return false if we've gone beyond the UNTIL or COUNT
statements.

@return bool
Returns whether the current item is a valid item for the recurrence iterator . This will return false if we ve gone beyond the UNTIL or COUNT statements .