Recurr\Rule::setUntil PHP Метод

setUntil() публичный Метод

Either UNTIL or COUNT may be specified, but UNTIL and COUNT MUST NOT both be specified.
public setUntil ( DateTime $until )
$until DateTime The upper bound of the recurrence.
    public function setUntil(\DateTime $until)
    {
        $this->until = $until;
        $this->count = null;
        return $this;
    }

Usage Example

Пример #1
0
 public function testGetStringWithUTC()
 {
     $this->rule->setFreq('DAILY');
     $this->rule->setInterval(1);
     $this->rule->setUntil(new \DateTime('2015-07-10 04:00:00', new \DateTimeZone('America/New_York')));
     $this->assertNotEquals('FREQ=DAILY;UNTIL=20150710T040000Z;INTERVAL=1', $this->rule->getString());
     $this->assertEquals('FREQ=DAILY;UNTIL=20150710T080000Z;INTERVAL=1', $this->rule->getString(Rule::TZ_FIXED));
 }
All Usage Examples Of Recurr\Rule::setUntil