public function indexOf(Period $interval)
    {
        foreach ($this->intervals as $offset => $period) {
            if ($period->equals($interval)) {
                return $offset;
            }
        }

        return false;
    }
public function indexOf(Period $interval)
    {
        foreach ($this->intervals as $offset => $period) {
            if ($period->equals($interval)) {
                return $offset;
            }
        }

        return false;
    }
public function indexOf ( Period $ interval ) { foreach ( $ this -> intervals as $ offset => $ period ) { if ( $ period -> equals ( $ interval ) ) { return $ offset ; } } return false ; }
Attempts to find the first offset attached to the submitted interval.

If no offset is found the method returns boolean false.

@return int|bool
Attempts to find the first offset attached to the submitted interval .