public function valid()
    {
        if ($this->counter > Settings::$maxRecurrences && -1 !== Settings::$maxRecurrences) {
            throw new MaxInstancesExceededException('Recurring events are only allowed to generate '.Settings::$maxRecurrences);
        }

        return (bool) $this->currentDate;
    }
public function valid()
    {
        if ($this->counter > Settings::$maxRecurrences && -1 !== Settings::$maxRecurrences) {
            throw new MaxInstancesExceededException('Recurring events are only allowed to generate '.Settings::$maxRecurrences);
        }

        return (bool) $this->currentDate;
    }
public function valid ( ) { if ( $ this -> counter > Settings :: $ maxRecurrences && - 1 !== Settings :: $ maxRecurrences ) { throw new MaxInstancesExceededException ( 'Recurring events are only allowed to generate ' . Settings :: $ maxRecurrences ) ; } return ( bool ) $ this -> currentDate ; }
This is called after next, to see if the iterator is still at a valid
position, or if it's at the end.

@return bool
This is called after next to see if the iterator is still at a valid position or if it s at the end .