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;
}
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)); }