16 $ev =
$vcal->createComponent(
'VEVENT');
18 $ev->RRULE =
'FREQ=DAILY;BYHOUR=10;BYMINUTE=5;BYSECOND=16;BYWEEKNO=32;BYYEARDAY=100,200';
19 $dtStart =
$vcal->createProperty(
'DTSTART');
28 $this->assertTrue($it->isInfinite());
39 $ev =
$vcal->createComponent(
'VEVENT');
40 $ev->RRULE =
'FREQ=SMONTHLY;INTERVAL=3;UNTIL=20111025T000000Z';
42 $dtStart =
$vcal->createProperty(
'DTSTART');
78 $ev =
$vcal->createComponent(
'VEVENT');
81 $ev->RRULE =
'FREQ=HOURLY;INTERVAL=3;UNTIL=20111025T000000Z';
82 $dtStart =
$vcal->createProperty(
'DTSTART');
93 foreach ($it as $item) {
130 $ev =
$vcal->createComponent(
'VEVENT');
133 $ev->RRULE =
'FREQ=DAILY;INTERVAL=3;UNTIL=20111025T000000Z';
134 $dtStart =
$vcal->createProperty(
'DTSTART');
146 foreach ($it as $item) {
178 $ev =
$vcal->createComponent(
'VEVENT');
181 $dtStart =
$vcal->createProperty(
'DTSTART');
193 foreach ($it as $item) {
219 $ev =
$vcal->createComponent(
'VEVENT');
222 $ev->RRULE =
'FREQ=DAILY;BYDAY=SA,SU;BYHOUR=6,7';
223 $dtStart =
$vcal->createProperty(
'DTSTART');
235 foreach ($it as $item) {
272 $ev =
$vcal->createComponent(
'VEVENT');
275 $ev->RRULE =
'FREQ=DAILY;INTERVAL=2;BYHOUR=10,11,12,13,14,15';
276 $dtStart =
$vcal->createProperty(
'DTSTART');
288 foreach ($it as $item) {
325 $ev =
$vcal->createComponent(
'VEVENT');
328 $ev->RRULE =
'FREQ=DAILY;INTERVAL=2;BYDAY=TU,WE,FR';
329 $dtStart =
$vcal->createProperty(
'DTSTART');
341 foreach ($it as $item) {
378 $ev =
$vcal->createComponent(
'VEVENT');
381 $ev->RRULE =
'FREQ=WEEKLY;INTERVAL=2;COUNT=10';
382 $dtStart =
$vcal->createProperty(
'DTSTART');
394 foreach ($it as $item) {
429 $ev =
$vcal->createComponent(
'VEVENT');
432 $ev->RRULE =
'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=MO;BYHOUR=8,9,10';
433 $dtStart =
$vcal->createProperty(
'DTSTART');
445 foreach ($it as $item) {
485 $ev =
$vcal->createComponent(
'VEVENT');
488 $ev->RRULE =
'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU';
489 $dtStart =
$vcal->createProperty(
'DTSTART');
501 foreach ($it as $item) {
538 $ev =
$vcal->createComponent(
'VEVENT');
541 $ev->RRULE =
'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU';
542 $dtStart =
$vcal->createProperty(
'DTSTART');
554 foreach ($it as $item) {
591 $ev =
$vcal->createComponent(
'VEVENT');
594 $ev->RRULE =
'FREQ=MONTHLY;INTERVAL=3;COUNT=5';
595 $dtStart =
$vcal->createProperty(
'DTSTART');
606 foreach ($it as $item) {
637 $ev =
$vcal->createComponent(
'VEVENT');
640 $ev->RRULE =
'FREQ=MONTHLY;INTERVAL=2;COUNT=12';
641 $dtStart =
$vcal->createProperty(
'DTSTART');
652 foreach ($it as $item) {
690 $ev =
$vcal->createComponent(
'VEVENT');
693 $ev->RRULE =
'FREQ=MONTHLY;INTERVAL=5;COUNT=9;BYMONTHDAY=1,31,-7';
694 $dtStart =
$vcal->createProperty(
'DTSTART');
705 foreach ($it as $item) {
743 $ev =
$vcal->createComponent(
'VEVENT');
746 $ev->RRULE =
'FREQ=MONTHLY;INTERVAL=2;COUNT=16;BYDAY=MO,-2TU,+1WE,3TH';
747 $dtStart =
$vcal->createProperty(
'DTSTART');
758 foreach ($it as $item) {
799 $ev =
$vcal->createComponent(
'VEVENT');
802 $ev->RRULE =
'FREQ=MONTHLY;COUNT=10;BYDAY=MO;BYMONTHDAY=1';
803 $dtStart =
$vcal->createProperty(
'DTSTART');
814 foreach ($it as $item) {
849 $ev =
$vcal->createComponent(
'VEVENT');
852 $ev->RRULE =
'FREQ=MONTHLY;COUNT=10;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1,-1';
853 $dtStart =
$vcal->createProperty(
'DTSTART');
864 foreach ($it as $item) {
899 $ev =
$vcal->createComponent(
'VEVENT');
902 $ev->RRULE =
'FREQ=YEARLY;COUNT=10;INTERVAL=3';
903 $dtStart =
$vcal->createProperty(
'DTSTART');
914 foreach ($it as $item) {
949 $ev =
$vcal->createComponent(
'VEVENT');
952 $ev->RRULE =
'FREQ=YEARLY;COUNT=3';
953 $dtStart =
$vcal->createProperty(
'DTSTART');
964 foreach ($it as $item) {
992 $ev =
$vcal->createComponent(
'VEVENT');
995 $ev->RRULE =
'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYMONTH=4,10';
996 $dtStart =
$vcal->createProperty(
'DTSTART');
1007 foreach ($it as $item) {
1018 $this->assertEquals(
1040 $ev =
$vcal->createComponent(
'VEVENT');
1043 $ev->RRULE =
'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU';
1044 $dtStart =
$vcal->createProperty(
'DTSTART');
1055 foreach ($it as $item) {
1066 $this->assertEquals(
1088 $ev =
$vcal->createComponent(
'VEVENT');
1091 $ev->RRULE =
'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU';
1092 $dtStart =
$vcal->createProperty(
'DTSTART');
1107 while ($item = $it->current()) {
1117 $this->assertEquals([],
$result);
1126 $ev =
$vcal->createComponent(
'VEVENT');
1129 $ev->RRULE =
'FREQ=DAILY';
1131 $dtStart =
$vcal->createProperty(
'DTSTART');
1135 $dtEnd =
$vcal->createProperty(
'DTSTART');
1154 $ev =
$vcal->createComponent(
'VEVENT');
1157 $ev->RRULE =
'FREQ=YEARLY;COUNT=10';
1158 $dtStart =
$vcal->createProperty(
'DTSTART');
1163 $exDate1 =
$vcal->createProperty(
'EXDATE');
1165 $exDate2 =
$vcal->createProperty(
'EXDATE');
1178 foreach ($it as $item) {
1187 $this->assertEquals(
1209 $ev1 =
$vcal->createComponent(
'VEVENT');
1210 $ev1->UID =
'overridden';
1211 $ev1->RRULE =
'FREQ=DAILY;COUNT=10';
1212 $ev1->DTSTART =
'20120107T120000Z';
1213 $ev1->SUMMARY =
'baseEvent';
1218 $ev2 =
$vcal->createComponent(
'VEVENT');
1219 $ev2->UID =
'overridden';
1220 $ev2->{
'RECURRENCE-ID'} =
'20120110T120000Z';
1221 $ev2->DTSTART =
'20120110T140000Z';
1222 $ev2->SUMMARY =
'Event 2';
1227 $ev3 =
$vcal->createComponent(
'VEVENT');
1228 $ev3->UID =
'overridden';
1229 $ev3->{
'RECURRENCE-ID'} =
'20120113T120000Z';
1230 $ev3->DTSTART =
'20120115T140000Z';
1231 $ev3->SUMMARY =
'Event 3';
1239 while ($it->valid()) {
1241 $dates[] = $it->getDTStart();
1242 $summaries[] = (string)$it->getEventObject()->SUMMARY;
1248 $this->assertEquals([
1261 $this->assertEquals([
1283 $ev1 =
$vcal->createComponent(
'VEVENT');
1284 $ev1->UID =
'overridden';
1285 $ev1->RRULE =
'FREQ=WEEKLY;COUNT=3';
1286 $ev1->DTSTART =
'20120112T120000Z';
1287 $ev1->SUMMARY =
'baseEvent';
1292 $ev2 =
$vcal->createComponent(
'VEVENT');
1293 $ev2->UID =
'overridden';
1294 $ev2->{
'RECURRENCE-ID'} =
'20120119T120000Z';
1295 $ev2->DTSTART =
'20120113T120000Z';
1296 $ev2->SUMMARY =
'Override!';
1304 while ($it->valid()) {
1306 $dates[] = $it->getDTStart();
1307 $summaries[] = (string)$it->getEventObject()->SUMMARY;
1313 $this->assertEquals([
1320 $this->assertEquals([
1334 $ev1 =
$vcal->createComponent(
'VEVENT');
1336 $ev1->UID =
'overridden';
1337 $ev1->RRULE =
'FREQ=WEEKLY;COUNT=3';
1338 $ev1->DTSTART =
'20120124T120000Z';
1339 $ev1->SUMMARY =
'baseEvent';
1344 $ev2 =
$vcal->createComponent(
'VEVENT');
1345 $ev2->UID =
'overridden';
1346 $ev2->{
'RECURRENCE-ID'} =
'20120131T120000Z';
1347 $ev2->DTSTART =
'20120125T120000Z';
1348 $ev2->SUMMARY =
'Override!';
1365 while ($it->valid() && $it->getDTStart() <
new DateTimeImmutable(
'2012-02-06 23:00:00')) {
1367 $dates[] = $it->getDTStart();
1368 $summaries[] = (string)$it->getEventObject()->SUMMARY;
1373 $this->assertEquals([], $dates);
1374 $this->assertEquals([], $summaries);
1384 $ev =
$vcal->createComponent(
'VEVENT');
1391 $dtStart =
$vcal->createProperty(
'DTSTART');
1403 foreach ($it as $item) {
1414 $this->assertEquals(
1433 $ev2 =
$vcal->createComponent(
'VEVENT');
1434 $ev2->UID =
'overridden';
1435 $ev2->{
'RECURRENCE-ID'} =
'20120110T120000Z';
1436 $ev2->DTSTART =
'20120110T140000Z';
1437 $ev2->SUMMARY =
'Event 2';
1442 $ev3 =
$vcal->createComponent(
'VEVENT');
1443 $ev3->UID =
'overridden';
1444 $ev3->{
'RECURRENCE-ID'} =
'20120113T120000Z';
1445 $ev3->DTSTART =
'20120115T140000Z';
1446 $ev3->SUMMARY =
'Event 3';
testMonthlyByDay()
A pretty slow test.
testYearlyLeapYear()
testValues
testNoMasterBadUID()
testValues
testDailyByHour()
testValues
testFastForwardAllDayEventThatStopAtTheStartTime()
testValues
testYearlyByMonthByDay()
testValues
testWeeklyByDaySpecificHour()
testValues
testMonthlyEndOfMonth()
testValues
testYearlyByMonth()
testValues
testDailyByDay()
testValues
testFastForward()
testValues
testInvalidFreq()
testValues
testVCalendarInvalidUID()
InvalidArgumentException
This class is used to determine new for a recurring event, when the next events occur.
testOverridenEvent2()
testValues
testOverridenEvent()
testValues
testMonthlyByDayByMonthDay()
testValues
testWeeklyByDay()
testValues
testMonthlyByDayBySetPos()
testValues
testWeeklyByDayByHour()
testValues
testVCalendarNoUID()
InvalidArgumentException
testComplexExclusions()
testValues
testOverridenEventNoValuesExpected()
testValues
testMonthlyByMonthDay()
testValues
testDailyByDayByHour()
testValues