setByWeekNumber() public method

Valid values are 1 to 53 or -53 to -1. This corresponds to weeks according to week numbering as defined in [ISO 8601]. A week is defined as a seven day period, starting on the day of the week defined to be the week start (see setWeekStart). Week number one of the calendar year is the first week which contains at least four days in that calendar year. This rule is only valid for YEARLY rules. For example, 3 represents the third week of the year. Note: Assuming a Monday week start, week 53 can only occur when Thursday is January 1 or if it is a leap year and Wednesday is January 1.
public setByWeekNumber ( array $byWeekNumber )
$byWeekNumber array Array of ordinals specifying weeks of the year.
Exemplo n.º 1
0
 public function testGetString()
 {
     $this->rule->setFreq('YEARLY');
     $this->rule->setCount(2);
     $this->rule->setInterval(2);
     $this->rule->setBySecond(array(30));
     $this->rule->setByMinute(array(10));
     $this->rule->setByHour(array(5, 15));
     $this->rule->setByDay(array('SU', 'WE'));
     $this->rule->setByMonthDay(array(16, 22));
     $this->rule->setByYearDay(array(201, 203));
     $this->rule->setByWeekNumber(array(29, 32));
     $this->rule->setByMonth(array(7, 8));
     $this->rule->setBySetPosition(array(1, 3));
     $this->rule->setWeekStart('TU');
     $this->rule->setExDates(array('20140607', '20140620T010000Z', '20140620T010000'));
     $this->assertEquals('FREQ=YEARLY;COUNT=2;INTERVAL=2;BYSECOND=30;BYMINUTE=10;BYHOUR=5,15;BYDAY=SU,WE;BYMONTHDAY=16,22;BYYEARDAY=201,203;BYWEEKNO=29,32;BYMONTH=7,8;BYSETPOS=1,3;WKST=TU;EXDATE=20140607,20140620T010000Z,20140620T010000', $this->rule->getString());
 }