Retrieves the length of time between recurrences of this event.
public getRecurInterval ( ) : integer | ||
return | integer | The number of seconds between recurrences. |
/** * Return whether or not this object is equal to another recurrence object. * The objects are considered equal if the recurrence rules are the same. * This does not take any exceptions into account. * * @param Horde_Date_Recurrence $recurrence The recurrence object to check * equality to. * * @return boolean True if the recurrence rules are the same. * @since 2.2.0 */ public function isEqual(Horde_Date_Recurrence $recurrence) { return $this->getRecurType() == $recurrence->getRecurType() && $this->getRecurInterval() == $recurrence->getRecurInterval() && $this->getRecurCount() == $recurrence->getRecurCount() && $this->getRecurEnd() == $recurrence->getRecurEnd() && $this->getRecurStart() == $recurrence->getRecurStart() && $this->getRecurOnDays() == $recurrence->getRecurOnDays(); }
public function testParseYearlyWeekday() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;UNTIL=20090301'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 00:00:00', (string) $r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;UNTIL=20090302T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 09:00:00', (string) $r->recurEnd->setTimezone('UTC')); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); }