15 'FREQ=HOURLY;INTERVAL=3;COUNT=12',
16 '2011-10-07 12:00:00',
18 '2011-10-07 12:00:00',
19 '2011-10-07 15:00:00',
20 '2011-10-07 18:00:00',
21 '2011-10-07 21:00:00',
22 '2011-10-08 00:00:00',
23 '2011-10-08 03:00:00',
24 '2011-10-08 06:00:00',
25 '2011-10-08 09:00:00',
26 '2011-10-08 12:00:00',
27 '2011-10-08 15:00:00',
28 '2011-10-08 18:00:00',
29 '2011-10-08 21:00:00',
38 'FREQ=DAILY;INTERVAL=3;UNTIL=20111025T000000Z',
41 '2011-10-07 00:00:00',
42 '2011-10-10 00:00:00',
43 '2011-10-13 00:00:00',
44 '2011-10-16 00:00:00',
45 '2011-10-19 00:00:00',
46 '2011-10-22 00:00:00',
47 '2011-10-25 00:00:00',
56 'FREQ=DAILY;BYDAY=SA,SU;BYHOUR=6,7',
57 '2011-10-08 06:00:00',
59 '2011-10-08 06:00:00',
60 '2011-10-08 07:00:00',
61 '2011-10-09 06:00:00',
62 '2011-10-09 07:00:00',
63 '2011-10-15 06:00:00',
64 '2011-10-15 07:00:00',
65 '2011-10-16 06:00:00',
66 '2011-10-16 07:00:00',
67 '2011-10-22 06:00:00',
68 '2011-10-22 07:00:00',
69 '2011-10-23 06:00:00',
70 '2011-10-23 07:00:00',
79 'FREQ=DAILY;INTERVAL=2;BYHOUR=10,11,12,13,14,15',
80 '2012-10-11 12:00:00',
82 '2012-10-11 12:00:00',
83 '2012-10-11 13:00:00',
84 '2012-10-11 14:00:00',
85 '2012-10-11 15:00:00',
86 '2012-10-13 10:00:00',
87 '2012-10-13 11:00:00',
88 '2012-10-13 12:00:00',
89 '2012-10-13 13:00:00',
90 '2012-10-13 14:00:00',
91 '2012-10-13 15:00:00',
92 '2012-10-15 10:00:00',
93 '2012-10-15 11:00:00',
102 'FREQ=DAILY;INTERVAL=2;BYDAY=TU,WE,FR',
103 '2011-10-07 12:00:00',
105 '2011-10-07 12:00:00',
106 '2011-10-11 12:00:00',
107 '2011-10-19 12:00:00',
108 '2011-10-21 12:00:00',
109 '2011-10-25 12:00:00',
110 '2011-11-02 12:00:00',
111 '2011-11-04 12:00:00',
112 '2011-11-08 12:00:00',
113 '2011-11-16 12:00:00',
114 '2011-11-18 12:00:00',
115 '2011-11-22 12:00:00',
116 '2011-11-30 12:00:00',
125 'FREQ=DAILY;COUNT=5',
126 '2014-08-01 18:03:00',
128 '2014-08-01 18:03:00',
129 '2014-08-02 18:03:00',
130 '2014-08-03 18:03:00',
131 '2014-08-04 18:03:00',
132 '2014-08-05 18:03:00',
141 'FREQ=DAILY;BYMONTH=9,10;BYDAY=SU',
142 '2007-10-04 16:00:00',
144 '2013-09-29 16:00:00',
145 '2013-10-06 16:00:00',
146 '2013-10-13 16:00:00',
147 '2013-10-20 16:00:00',
148 '2013-10-27 16:00:00',
149 '2014-09-07 16:00:00' 159 'FREQ=WEEKLY;INTERVAL=2;COUNT=10',
160 '2011-10-07 00:00:00',
162 '2011-10-07 00:00:00',
163 '2011-10-21 00:00:00',
164 '2011-11-04 00:00:00',
165 '2011-11-18 00:00:00',
166 '2011-12-02 00:00:00',
167 '2011-12-16 00:00:00',
168 '2011-12-30 00:00:00',
169 '2012-01-13 00:00:00',
170 '2012-01-27 00:00:00',
171 '2012-02-10 00:00:00',
180 'FREQ=WEEKLY;INTERVAL=1;COUNT=4;BYDAY=MO;WKST=SA',
181 '2014-08-01 00:00:00',
183 '2014-08-01 00:00:00',
184 '2014-08-04 00:00:00',
185 '2014-08-11 00:00:00',
186 '2014-08-18 00:00:00',
195 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU',
196 '2011-10-07 00:00:00',
198 '2011-10-07 00:00:00',
199 '2011-10-18 00:00:00',
200 '2011-10-19 00:00:00',
201 '2011-10-21 00:00:00',
202 '2011-11-01 00:00:00',
203 '2011-11-02 00:00:00',
204 '2011-11-04 00:00:00',
205 '2011-11-15 00:00:00',
206 '2011-11-16 00:00:00',
207 '2011-11-18 00:00:00',
208 '2011-11-29 00:00:00',
209 '2011-11-30 00:00:00',
218 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=MO;BYHOUR=8,9,10',
219 '2011-10-07 08:00:00',
221 '2011-10-07 08:00:00',
222 '2011-10-07 09:00:00',
223 '2011-10-07 10:00:00',
224 '2011-10-18 08:00:00',
225 '2011-10-18 09:00:00',
226 '2011-10-18 10:00:00',
227 '2011-10-19 08:00:00',
228 '2011-10-19 09:00:00',
229 '2011-10-19 10:00:00',
230 '2011-10-21 08:00:00',
231 '2011-10-21 09:00:00',
232 '2011-10-21 10:00:00',
233 '2011-11-01 08:00:00',
234 '2011-11-01 09:00:00',
235 '2011-11-01 10:00:00',
244 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU',
245 '2011-10-07 18:00:00',
247 '2011-10-07 18:00:00',
248 '2011-10-18 18:00:00',
249 '2011-10-19 18:00:00',
250 '2011-10-21 18:00:00',
251 '2011-11-01 18:00:00',
252 '2011-11-02 18:00:00',
253 '2011-11-04 18:00:00',
254 '2011-11-15 18:00:00',
255 '2011-11-16 18:00:00',
256 '2011-11-18 18:00:00',
257 '2011-11-29 18:00:00',
258 '2011-11-30 18:00:00',
267 'FREQ=MONTHLY;INTERVAL=3;COUNT=5',
268 '2011-12-05 00:00:00',
270 '2011-12-05 00:00:00',
271 '2012-03-05 00:00:00',
272 '2012-06-05 00:00:00',
273 '2012-09-05 00:00:00',
274 '2012-12-05 00:00:00',
283 'FREQ=MONTHLY;INTERVAL=2;COUNT=12',
284 '2011-12-31 00:00:00',
286 '2011-12-31 00:00:00',
287 '2012-08-31 00:00:00',
288 '2012-10-31 00:00:00',
289 '2012-12-31 00:00:00',
290 '2013-08-31 00:00:00',
291 '2013-10-31 00:00:00',
292 '2013-12-31 00:00:00',
293 '2014-08-31 00:00:00',
294 '2014-10-31 00:00:00',
295 '2014-12-31 00:00:00',
296 '2015-08-31 00:00:00',
297 '2015-10-31 00:00:00',
306 'FREQ=MONTHLY;INTERVAL=5;COUNT=9;BYMONTHDAY=1,31,-7',
307 '2011-01-01 00:00:00',
309 '2011-01-01 00:00:00',
310 '2011-01-25 00:00:00',
311 '2011-01-31 00:00:00',
312 '2011-06-01 00:00:00',
313 '2011-06-24 00:00:00',
314 '2011-11-01 00:00:00',
315 '2011-11-24 00:00:00',
316 '2012-04-01 00:00:00',
317 '2012-04-24 00:00:00',
326 'FREQ=MONTHLY;INTERVAL=2;COUNT=16;BYDAY=MO,-2TU,+1WE,3TH',
327 '2011-01-03 00:00:00',
329 '2011-01-03 00:00:00',
330 '2011-01-05 00:00:00',
331 '2011-01-10 00:00:00',
332 '2011-01-17 00:00:00',
333 '2011-01-18 00:00:00',
334 '2011-01-20 00:00:00',
335 '2011-01-24 00:00:00',
336 '2011-01-31 00:00:00',
337 '2011-03-02 00:00:00',
338 '2011-03-07 00:00:00',
339 '2011-03-14 00:00:00',
340 '2011-03-17 00:00:00',
341 '2011-03-21 00:00:00',
342 '2011-03-22 00:00:00',
343 '2011-03-28 00:00:00',
344 '2011-05-02 00:00:00',
353 'FREQ=MONTHLY;COUNT=10;BYDAY=MO;BYMONTHDAY=1',
354 '2011-08-01 00:00:00',
356 '2011-08-01 00:00:00',
357 '2012-10-01 00:00:00',
358 '2013-04-01 00:00:00',
359 '2013-07-01 00:00:00',
360 '2014-09-01 00:00:00',
361 '2014-12-01 00:00:00',
362 '2015-06-01 00:00:00',
363 '2016-02-01 00:00:00',
364 '2016-08-01 00:00:00',
365 '2017-05-01 00:00:00',
374 'FREQ=MONTHLY;COUNT=10;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1,-1',
375 '2011-01-03 00:00:00',
377 '2011-01-03 00:00:00',
378 '2011-01-31 00:00:00',
379 '2011-02-01 00:00:00',
380 '2011-02-28 00:00:00',
381 '2011-03-01 00:00:00',
382 '2011-03-31 00:00:00',
383 '2011-04-01 00:00:00',
384 '2011-04-29 00:00:00',
385 '2011-05-02 00:00:00',
386 '2011-05-31 00:00:00',
395 'FREQ=YEARLY;COUNT=10;INTERVAL=3',
396 '2011-01-01 00:00:00',
398 '2011-01-01 00:00:00',
399 '2014-01-01 00:00:00',
400 '2017-01-01 00:00:00',
401 '2020-01-01 00:00:00',
402 '2023-01-01 00:00:00',
403 '2026-01-01 00:00:00',
404 '2029-01-01 00:00:00',
405 '2032-01-01 00:00:00',
406 '2035-01-01 00:00:00',
407 '2038-01-01 00:00:00',
415 'FREQ=YEARLY;COUNT=3',
416 '2012-02-29 00:00:00',
418 '2012-02-29 00:00:00',
419 '2016-02-29 00:00:00',
420 '2020-02-29 00:00:00',
428 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYMONTH=4,10',
429 '2011-04-07 00:00:00',
431 '2011-04-07 00:00:00',
432 '2011-10-07 00:00:00',
433 '2015-04-07 00:00:00',
434 '2015-10-07 00:00:00',
435 '2019-04-07 00:00:00',
436 '2019-10-07 00:00:00',
437 '2023-04-07 00:00:00',
438 '2023-10-07 00:00:00',
450 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0',
451 '2011-04-07 00:00:00',
463 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=bla',
464 '2011-04-07 00:00:00',
476 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0,bla',
477 '2011-04-07 00:00:00',
489 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=',
490 '2011-04-07 00:00:00',
499 'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU',
500 '2011-04-04 00:00:00',
502 '2011-04-04 00:00:00',
503 '2011-04-24 00:00:00',
504 '2011-10-03 00:00:00',
505 '2011-10-30 00:00:00',
506 '2016-04-04 00:00:00',
507 '2016-04-24 00:00:00',
508 '2016-10-03 00:00:00',
509 '2016-10-30 00:00:00',
518 'FREQ=YEARLY;COUNT=7;INTERVAL=2;BYYEARDAY=190',
519 '2011-07-10 03:07:00',
521 '2011-07-10 03:07:00',
522 '2013-07-10 03:07:00',
523 '2015-07-10 03:07:00',
524 '2017-07-10 03:07:00',
525 '2019-07-10 03:07:00',
526 '2021-07-10 03:07:00',
527 '2023-07-10 03:07:00',
538 $start =
'2011-07-10 03:07:00';
539 $rule =
'FREQ=YEARLY;COUNT=7;INTERVAL=2;BYYEARDAY=190';
548 $this->assertEquals($item->format(
'Y-m-d H:i:s'),
'2013-07-10 03:07:00');
554 'FREQ=YEARLY;COUNT=8;INTERVAL=3;BYYEARDAY=190,301',
555 '2011-07-10 14:53:11',
557 '2011-07-10 14:53:11',
558 '2011-10-29 14:53:11',
559 '2014-07-10 14:53:11',
560 '2014-10-29 14:53:11',
561 '2017-07-10 14:53:11',
562 '2017-10-29 14:53:11',
563 '2020-07-09 14:53:11',
564 '2020-10-28 14:53:11',
573 'FREQ=YEARLY;COUNT=6;BYYEARDAY=97;BYDAY=SA',
574 '2001-04-07 14:53:11',
576 '2001-04-07 14:53:11',
577 '2006-04-08 14:53:11',
578 '2012-04-07 14:53:11',
579 '2017-04-08 14:53:11',
580 '2023-04-08 14:53:11',
581 '2034-04-08 14:53:11',
590 'FREQ=YEARLY;COUNT=8;BYYEARDAY=-97,-5',
591 '2001-09-26 14:53:11',
593 '2001-09-26 14:53:11',
594 '2001-12-27 14:53:11',
595 '2002-09-26 14:53:11',
596 '2002-12-27 14:53:11',
597 '2003-09-26 14:53:11',
598 '2003-12-27 14:53:11',
599 '2004-09-26 14:53:11',
600 '2004-12-27 14:53:11',
612 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYYEARDAY=390',
613 '2011-04-07 00:00:00',
626 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYYEARDAY=0',
627 '2011-04-07 00:00:00',
639 'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU',
640 '2011-04-04 00:00:00',
642 '2020-05-05 00:00:00' 660 'FREQ=MONTHLY;INTERVAL=1;UNTIL=20071030T035959Z;BYDAY=5TU',
661 '2007-10-04 14:46:42',
663 '2007-10-04 14:46:42',
676 'FREQ=WEEKLY;BYDAY=MO;UNTIL=20090704T205959Z;INTERVAL=1',
677 '2009-04-20 18:00:00',
679 '2009-04-20 18:00:00',
680 '2009-04-27 18:00:00',
681 '2009-05-04 18:00:00',
682 '2009-05-11 18:00:00',
683 '2009-05-18 18:00:00',
684 '2009-05-25 18:00:00',
685 '2009-06-01 18:00:00',
686 '2009-06-08 18:00:00',
687 '2009-06-15 18:00:00',
688 '2009-06-22 18:00:00',
689 '2009-06-29 18:00:00',
698 'FREQ=YEARLY;BYWEEKNO=20;BYDAY=TU',
699 '2011-02-07 00:00:00',
701 '2011-02-07 00:00:00',
702 '2011-05-17 00:00:00',
703 '2012-05-15 00:00:00',
704 '2013-05-14 00:00:00',
705 '2014-05-13 00:00:00',
706 '2015-05-12 00:00:00',
707 '2016-05-17 00:00:00',
708 '2017-05-16 00:00:00',
709 '2018-05-15 00:00:00',
710 '2019-05-14 00:00:00',
711 '2020-05-12 00:00:00',
712 '2021-05-18 00:00:00',
721 'FREQ=YEARLY;BYWEEKNO=-20;BYDAY=TU,FR',
722 '2011-09-02 00:00:00',
724 '2011-09-02 00:00:00',
725 '2012-08-07 00:00:00',
726 '2012-08-10 00:00:00',
727 '2013-08-06 00:00:00',
728 '2013-08-09 00:00:00',
729 '2014-08-05 00:00:00',
730 '2014-08-08 00:00:00',
731 '2015-08-11 00:00:00',
732 '2015-08-14 00:00:00',
733 '2016-08-09 00:00:00',
734 '2016-08-12 00:00:00',
735 '2017-08-08 00:00:00',
744 'FREQ=YEARLY;BYWEEKNO=20;BYDAY=TU,FR',
745 '2011-09-07 09:00:00',
747 '2011-09-07 09:00:00',
748 '2012-05-15 09:00:00',
749 '2012-05-18 09:00:00',
750 '2013-05-14 09:00:00',
751 '2013-05-17 09:00:00',
752 '2014-05-13 09:00:00',
753 '2014-05-16 09:00:00',
754 '2015-05-12 09:00:00',
755 '2015-05-15 09:00:00',
756 '2016-05-17 09:00:00',
757 '2016-05-20 09:00:00',
758 '2017-05-16 09:00:00',
767 'FREQ=YEARLY;BYWEEKNO=20',
768 '2011-05-16 00:00:00',
770 '2011-05-16 00:00:00',
771 '2012-05-14 00:00:00',
772 '2013-05-13 00:00:00',
773 '2014-05-12 00:00:00',
774 '2015-05-11 00:00:00',
775 '2016-05-16 00:00:00',
776 '2017-05-15 00:00:00',
777 '2018-05-14 00:00:00',
778 '2019-05-13 00:00:00',
779 '2020-05-11 00:00:00',
780 '2021-05-17 00:00:00',
781 '2022-05-16 00:00:00',
790 'FREQ=YEARLY;BYWEEKNO=20,50;BYDAY=TU,FR',
791 '2011-01-16 00:00:00',
793 '2011-01-16 00:00:00',
794 '2011-05-17 00:00:00',
795 '2011-05-20 00:00:00',
796 '2011-12-13 00:00:00',
797 '2011-12-16 00:00:00',
798 '2012-05-15 00:00:00',
799 '2012-05-18 00:00:00',
800 '2012-12-11 00:00:00',
801 '2012-12-14 00:00:00',
802 '2013-05-14 00:00:00',
803 '2013-05-17 00:00:00',
804 '2013-12-10 00:00:00',
816 'FREQ=YEARLY;BYWEEKNO=54',
817 '2011-05-16 00:00:00',
830 'FREQ=YEARLY;INTERVAL=1;UNTIL=20120203T225959Z;BYMONTH=2;BYSETPOS=1;BYDAY=SU,MO,TU,WE,TH,FR,SA',
831 '2012-01-01 15:45:00',
833 '2012-02-01 15:45:00',
835 '2012-01-29 23:00:00' 851 'FREQ=YEARLY;INTERVAL=0',
852 '2012-08-24 14:57:00',
854 '2013-01-01 23:00:00' 865 'FREQ=SMONTHLY;INTERVAL=3;UNTIL=20111025T000000Z',
878 'FREQ=WEEKLY;INTERVAL=1;COUNT=4;BYDAY=0MO;WKST=SA',
879 '2014-08-01 00:00:00',
888 'FREQ=WEEKLY;UNTIL=20131118T183000',
889 '2013-09-23 18:30:00',
891 '2013-09-23 18:30:00',
892 '2013-09-30 18:30:00',
893 '2013-10-07 18:30:00',
894 '2013-10-14 18:30:00',
895 '2013-10-21 18:30:00',
896 '2013-10-28 18:30:00',
897 '2013-11-04 18:30:00',
898 '2013-11-11 18:30:00',
899 '2013-11-18 18:30:00',
910 'FREQ=DAILY;UNTIL=20140101T000000Z',
911 '2014-08-02 00:15:00',
913 '2014-08-02 00:15:00',
922 'FREQ=DAILY;BYSECOND=1;BYMINUTE=1;BYYEARDAY=1;BYWEEKNO=1;COUNT=2',
923 '2014-08-02 00:15:00',
925 '2014-08-02 00:15:00',
926 '2014-08-03 00:15:00',
935 'FREQ=MONTHLY;BYDAY=-4TH,-5TH;COUNT=4',
936 '2015-01-01 00:15:00',
938 '2015-01-01 00:15:00',
939 '2015-01-08 00:15:00',
940 '2015-02-05 00:15:00',
941 '2015-03-05 00:15:00' 953 'FREQ=DAILY;BYWODAN=1',
954 '2014-08-02 00:15:00',
965 new DateTime(
'2014-08-03 00:00:13'),
976 new DateTime(
'2014-08-02 00:00:13'),
999 $result[] = $item->format(
'Y-m-d H:i:s');
1001 if (
$parser->isInfinite() && count(
$result) >= count($expected)) {
1008 $this->assertEquals(
testMonthlyByDayBySetPos()
testYearlyByYearDayNegative()
parse($rule, $start, $expected, $fastForward=null, $tz='UTC')
testUntilBeginHasTimezone()
testYearlyByYearDayInvalid390()
testYearlyByYearDayByDay()
testYearlyByMonthEmptyValue()
testYearlyByYearDayInvalid0()
testValidByWeekNoByDayDefault()
testYearlyByYearDayMultiple()
testYearlyByMonthLoop()
This also at one point caused an infinite loop.
testFifthTuesdayProblem()
The bug that was in the system before would fail on the 5th tuesday of the month, if the 5th tuesday ...
testMultipleValidByWeekNo()
testFastFowardTooFar()
This bug came from a Fruux customer.
testWeeklyByDaySpecificHour()
testYearlyByYearDayImmutable()
testYearlyByMonthInvalidValue2()
testMonthlyByDayByMonthDay()
testNegativeValidByWeekNo()
testYearlyByMonthManyInvalidValues()
testZeroInterval()
Something, somewhere produced an ics with an interval set to 0.
testYearlyByMonthInvalidValue1()