getString() 공개 메소드

Get the RRULE as a string
public getString ( $timezoneType = self::TZ_FLOAT ) : string
리턴 string
예제 #1
0
파일: RuleTest.php 프로젝트: emnsen/recurr
 public function testSetStartDateAffectsStringOutput()
 {
     $this->rule->loadFromString('FREQ=MONTHLY;COUNT=2');
     $this->assertEquals('FREQ=MONTHLY;COUNT=2', $this->rule->getString());
     $this->rule->setStartDate(new \DateTime('2015-12-10'));
     $this->assertEquals('FREQ=MONTHLY;COUNT=2', $this->rule->getString());
     $this->rule->setStartDate(new \DateTime('2015-12-10'), true);
     $this->assertEquals('FREQ=MONTHLY;COUNT=2;DTSTART=20151210T000000', $this->rule->getString());
     $this->rule->setStartDate(new \DateTime('2015-12-10'), false);
     $this->assertEquals('FREQ=MONTHLY;COUNT=2', $this->rule->getString());
 }
예제 #2
0
파일: RuleTest.php 프로젝트: autocar/recurr
 public function testGetStringWithExplicitWkst()
 {
     $string = 'FREQ=MONTHLY;COUNT=2;INTERVAL=1;WKST=TH';
     $this->rule->loadFromString($string);
     $this->assertContains('WKST=TH', $this->rule->getString());
 }
예제 #3
0
 public function testGetStringWithUntil()
 {
     $string = 'FREQ=MONTHLY;UNTIL=20140410T163045;INTERVAL=1;WKST=MO';
     $this->rule->loadFromString($string);
     $this->assertEquals($string, $this->rule->getString());
 }
예제 #4
0
 public function testGetStringWithDtend()
 {
     $string = 'FREQ=MONTHLY;DTEND=20140410T083045;INTERVAL=1;WKST=MO';
     $this->rule->loadFromString($string);
     $this->assertEquals($string, $this->rule->getString());
 }