Debian Codegraph @

t/recur.dates.0.t

raw symbols SCIP
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5 use Test::Inter;
6 $::ti = new Test::Inter $0;
7 require "tests.pl";
8
9 my $obj = new Date::Manip::Recur;
10 $obj->config("forcedate","2000-01-21-00:00:00,America/New_York");
11 $obj->config("ConfigFile","Manip.cnf");
12
13 sub test {
14 my(@test)=@_;
15 my $err = $obj->parse(@test);
16 if ($err) {
17 return $obj->err();
18 } else {
19 my @dates = $obj->dates();
20 $err = $obj->err();
21 return $err if ($err);
22 my @ret = ();
23 foreach my $d (@dates) {
24 my $v = $d->value();
25 push(@ret,$v);
26 }
27 return @ret;
28 }
29 }
30
31 my $tests="
32
33 ### All Y/M/W/D combos
34
35 # Y:M:W:D*
36
37 1:2:3:4*12:30:00
38 2000010500:00:00
39 2000010100:00:00
40 2003010100:00:00
41 =>
42 2000010512:30:00
43 2001033012:30:00
44 2002062412:30:00
45
46 1:2:3:0*12:30:00
47 2000010500:00:00
48 2000010100:00:00
49 2003010100:00:00
50 =>
51 2000010512:30:00
52 2001032612:30:00
53 2002061612:30:00
54
55 0:2:3:0*12:30:00
56 2000010500:00:00
57 2000010100:00:00
58 2000062100:00:00
59 =>
60 2000010512:30:00
61 2000032612:30:00
62 2000061612:30:00
63
64 1:0:3:0*12:30:00
65 2000010500:00:00
66 2000010100:00:00
67 2003010100:00:00
68 =>
69 2000010512:30:00
70 2001012612:30:00
71 2002021612:30:00
72
73 1:2:0:0*12:30:00
74 2000010500:00:00
75 2000010100:00:00
76 2003010100:00:00
77 =>
78 2000010512:30:00
79 2001030512:30:00
80 2002050512:30:00
81
82 1:0:0:0*12:30:00
83 2000010500:00:00
84 2000010100:00:00
85 2003010100:00:00
86 =>
87 2000010512:30:00
88 2001010512:30:00
89 2002010512:30:00
90
91 0:2:0:0*12:30:00
92 2000010500:00:00
93 2000010100:00:00
94 2000060100:00:00
95 =>
96 2000010512:30:00
97 2000030512:30:00
98 2000050512:30:00
99
100 0:0:3:0*12:30:00
101 2000010500:00:00
102 2000010100:00:00
103 2000030100:00:00
104 =>
105 2000010512:30:00
106 2000012612:30:00
107 2000021612:30:00
108
109 0:0:0:0*12:30:00
110 2000010500:00:00
111 2000010100:00:00
112 2000010320:00:00
113 =>
114 2000010112:30:00
115 2000010212:30:00
116 2000010312:30:00
117
118 # Y:M:W*D
119
120 1:2:3*4:12:30:00
121 2000010600:00:00
122 2000010100:00:00
123 2003010100:00:00
124 =>
125 2000010612:30:00
126 2001032212:30:00
127 2002061312:30:00
128
129 0:2:3*4:12:30:00
130 2000010600:00:00
131 2000010100:00:00
132 2000070100:00:00
133 =>
134 2000010612:30:00
135 2000032312:30:00
136 2000061512:30:00
137
138 1:0:3*4:12:30:00
139 2000010600:00:00
140 2000010100:00:00
141 2003010100:00:00
142 =>
143 2000010612:30:00
144 2001012512:30:00
145 2002021412:30:00
146
147 1:2:0*4:12:30:00
148 2000010600:00:00
149 2000010100:00:00
150 2003010100:00:00
151 =>
152 2000010412:30:00
153 2001030412:30:00
154 2002050412:30:00
155
156 1:0:0*4:12:30:00
157 2000010600:00:00
158 2000010100:00:00
159 2003010100:00:00
160 =>
161 2000010412:30:00
162 2001010412:30:00
163 2002010412:30:00
164
165 0:2:0*4:12:30:00
166 2000010600:00:00
167 2000010100:00:00
168 2000070100:00:00
169 =>
170 2000010412:30:00
171 2000030412:30:00
172 2000050412:30:00
173
174 0:0:3*4:12:30:00
175 2000010600:00:00
176 2000010100:00:00
177 2000030100:00:00
178 =>
179 2000010612:30:00
180 2000012712:30:00
181 2000021712:30:00
182
183 0:0:0*4:12:30:00
184 2000010500:00:00
185 2000010100:00:00
186 2000012100:00:00
187 =>
188 2000010612:30:00
189 2000011312:30:00
190 2000012012:30:00
191
192 # Y:M*W:D
193
194 1:2*3:4:12:30:00
195 2000010500:00:00
196 2000010100:00:00
197 2003010100:00:00
198 =>
199 2000012012:30:00
200 2001031512:30:00
201 2002051612:30:00
202
203 0:2*3:4:12:30:00
204 2000010500:00:00
205 2000010100:00:00
206 2000060100:00:00
207 =>
208 2000012012:30:00
209 2000031612:30:00
210 2000051812:30:00
211
212 1:0*3:4:12:30:00
213 2000010500:00:00
214 2000010100:00:00
215 2003010100:00:00
216 =>
217 2000012012:30:00
218 2001011812:30:00
219 2002011712:30:00
220
221 1:2*0:4:12:30:00
222 2000010600:00:00
223 2000010100:00:00
224 2003010100:00:00
225 =>
226 2000010412:30:00
227 2001030412:30:00
228 2002050412:30:00
229
230 1:0*0:4:12:30:00
231 2000010600:00:00
232 2000010100:00:00
233 2003010100:00:00
234 =>
235 2000010412:30:00
236 2001010412:30:00
237 2002010412:30:00
238
239 0:2*0:4:12:30:00
240 2000010600:00:00
241 2000010100:00:00
242 2000070100:00:00
243 =>
244 2000010412:30:00
245 2000030412:30:00
246 2000050412:30:00
247
248 0:0*3:4:12:30:00
249 2000010500:00:00
250 2000010100:00:00
251 2000040100:00:00
252 =>
253 2000012012:30:00
254 2000021712:30:00
255 2000031612:30:00
256
257 0:0*0:4:12:30:00
258 2000010600:00:00
259 2000010100:00:00
260 2000040100:00:00
261 =>
262 2000010412:30:00
263 2000020412:30:00
264 2000030412:30:00
265
266 # Y*M:W:D
267
268 1*2:3:4:12:30:00
269 2000010500:00:00
270 2000010100:00:00
271 2003010100:00:00
272 =>
273 2000021712:30:00
274 2001021512:30:00
275 2002022112:30:00
276
277 0*2:3:4:12:30:00
278 2000010500:00:00
279 2000010100:00:00
280 2003010100:00:00
281 =>
282 2000021712:30:00
283 2001021512:30:00
284 2002022112:30:00
285
286 1*0:3:4:12:30:00
287 2000010500:00:00
288 2000010100:00:00
289 2003010100:00:00
290 =>
291 2000012012:30:00
292 2001011812:30:00
293 2002011712:30:00
294
295 1*2:0:4:12:30:00
296 2000010600:00:00
297 2000010100:00:00
298 2003010100:00:00
299 =>
300 2000020412:30:00
301 2001020412:30:00
302 2002020412:30:00
303
304 1*0:0:4:12:30:00
305 2000010600:00:00
306 2000010100:00:00
307 2003010100:00:00
308 =>
309 2000010412:30:00
310 2001010412:30:00
311 2002010412:30:00
312
313 0*2:0:4:12:30:00
314 2000010600:00:00
315 2000010100:00:00
316 2003010100:00:00
317 =>
318 2000020412:30:00
319 2001020412:30:00
320 2002020412:30:00
321
322 0*0:3:4:12:30:00
323 2000010500:00:00
324 2000010100:00:00
325 2003010100:00:00
326 =>
327 2000012012:30:00
328 2001011812:30:00
329 2002011712:30:00
330
331 0*0:0:4:12:30:00
332 2000010600:00:00
333 2000010100:00:00
334 2003010100:00:00
335 =>
336 2000010412:30:00
337 2001010412:30:00
338 2002010412:30:00
339
340 # *Y:M:W:D
341
342 *1:2:3:4:12:30:00
343 =>
344 0001021512:30:00
345
346 *0:2:3:4:12:30:00
347 =>
348 2000021712:30:00
349
350 *1:0:3:4:12:30:00
351 =>
352 0001011812:30:00
353
354 *1:2:0:4:12:30:00
355 =>
356 0001020412:30:00
357
358 *1:0:0:4:12:30:00
359 =>
360 0001010412:30:00
361
362 *0:2:0:4:12:30:00
363 =>
364 2000020412:30:00
365
366 *0:0:3:4:12:30:00
367 =>
368 2000012012:30:00
369
370 *0:0:0:4:12:30:00
371 =>
372 2000010412:30:00
373
374 # Y:M:W*0
375
376 1:2:3*0:12:30:00
377 2000010500:00:00
378 2000010100:00:00
379 2003010100:00:00
380 =>
381 2000010312:30:00
382 2001031912:30:00
383 2002061012:30:00
384
385 0:2:3*0:12:30:00
386 2000010500:00:00
387 2000010100:00:00
388 2000070100:00:00
389 =>
390 2000010312:30:00
391 2000032012:30:00
392 2000061212:30:00
393
394 1:0:3*0:12:30:00
395 2000010500:00:00
396 2000010100:00:00
397 2003010100:00:00
398 =>
399 2000010312:30:00
400 2001012212:30:00
401 2002021112:30:00
402
403 1:2:0*0:12:30:00
404 2000010500:00:00
405 2000010100:00:00
406 2003010100:00:00
407 =>
408 2000010112:30:00
409 2001030112:30:00
410 2002050112:30:00
411
412 1:0:0*0:12:30:00
413 2000010500:00:00
414 2000010100:00:00
415 2003010100:00:00
416 =>
417 2000010112:30:00
418 2001010112:30:00
419 2002010112:30:00
420
421 0:2:0*0:12:30:00
422 2000010500:00:00
423 2000010100:00:00
424 2000060100:00:00
425 =>
426 2000010112:30:00
427 2000030112:30:00
428 2000050112:30:00
429
430 0:0:3*0:12:30:00
431 2000010500:00:00
432 2000010100:00:00
433 2000030100:00:00
434 =>
435 2000010312:30:00
436 2000012412:30:00
437 2000021412:30:00
438
439 0:0:0*0:12:30:00
440 2000010500:00:00
441 2000010100:00:00
442 2000011900:00:00
443 =>
444 2000010312:30:00
445 2000011012:30:00
446 2000011712:30:00
447
448 # Y:M*W:0
449
450 1:2*3:0:12:30:00
451 2000010600:00:00
452 2000010100:00:00
453 2003010100:00:00
454 =>
455 2000011712:30:00
456 2001031912:30:00
457 2002052012:30:00
458
459 0:2*3:0:12:30:00
460 2000010600:00:00
461 2000010100:00:00
462 2000070100:00:00
463 =>
464 2000011712:30:00
465 2000032012:30:00
466 2000051512:30:00
467
468 1:0*3:0:12:30:00
469 2000010600:00:00
470 2000010100:00:00
471 2003010100:00:00
472 =>
473 2000011712:30:00
474 2001011512:30:00
475 2002011412:30:00
476
477 1:2*0:0:12:30:00
478 2000010500:00:00
479 2000010100:00:00
480 2003010100:00:00
481 =>
482 2000010112:30:00
483 2001030112:30:00
484 2002050112:30:00
485
486 1:0*0:0:12:30:00
487 2000010500:00:00
488 2000010100:00:00
489 2003010100:00:00
490 =>
491 2000010112:30:00
492 2001010112:30:00
493 2002010112:30:00
494
495 0:2*0:0:12:30:00
496 2000010500:00:00
497 2000010100:00:00
498 2000060100:00:00
499 =>
500 2000010112:30:00
501 2000030112:30:00
502 2000050112:30:00
503
504 0:0*3:0:12:30:00
505 2000010600:00:00
506 2000010100:00:00
507 2000040100:00:00
508 =>
509 2000011712:30:00
510 2000022112:30:00
511 2000032012:30:00
512
513 0:0*0:0:12:30:00
514 2000010600:00:00
515 2000010100:00:00
516 2000040100:00:00
517 =>
518 2000010112:30:00
519 2000020112:30:00
520 2000030112:30:00
521
522 # Y*M:W:0
523
524 1*2:3:0:12:30:00
525 2000010600:00:00
526 2000010100:00:00
527 2003010100:00:00
528 =>
529 2000022112:30:00
530 2001021912:30:00
531 2002021812:30:00
532
533 0*2:3:0:12:30:00
534 2000010600:00:00
535 2000010100:00:00
536 2003010100:00:00
537 =>
538 2000022112:30:00
539 2001021912:30:00
540 2002021812:30:00
541
542 1*0:3:0:12:30:00
543 2000010600:00:00
544 2000010100:00:00
545 2003010100:00:00
546 =>
547 2000011712:30:00
548 2001011512:30:00
549 2002011412:30:00
550
551 1*2:0:0:12:30:00
552 2000010600:00:00
553 2000010100:00:00
554 2003010100:00:00
555 =>
556 2000020112:30:00
557 2001020112:30:00
558 2002020112:30:00
559
560 1*0:0:0:12:30:00
561 2000010500:00:00
562 2000010100:00:00
563 2003010100:00:00
564 =>
565 2000010112:30:00
566 2001010112:30:00
567 2002010112:30:00
568
569 0*2:0:0:12:30:00
570 2000010600:00:00
571 2000010100:00:00
572 2003010100:00:00
573 =>
574 2000020112:30:00
575 2001020112:30:00
576 2002020112:30:00
577
578 0*0:3:0:12:30:00
579 2000010600:00:00
580 2000010100:00:00
581 2003010100:00:00
582 =>
583 2000011712:30:00
584 2001011512:30:00
585 2002011412:30:00
586
587 0*0:0:0:12:30:00
588 2000010600:00:00
589 2000010100:00:00
590 2003010100:00:00
591 =>
592 2000010112:30:00
593 2001010112:30:00
594 2002010112:30:00
595
596 # *Y:M:W:0
597
598 *1:2:3:0:12:30:00
599 =>
600 0001021912:30:00
601
602 *0:2:3:0:12:30:00
603 =>
604 2000022112:30:00
605
606 *1:0:3:0:12:30:00
607 =>
608 0001011512:30:00
609
610 *0:0:3:0:12:30:00
611 =>
612 2000011712:30:00
613
614 *1:2:0:0:12:30:00
615 =>
616 0001020112:30:00
617
618 *0:2:0:0:12:30:00
619 =>
620 2000020112:30:00
621
622 *9:0:0:0:12:30:00
623 =>
624 0009010112:30:00
625
626 *0:0:0:0:12:30:00
627 =>
628 2000010112:30:00
629
630 ### English tests
631
632 'every Tuesday in June 1997'
633 =>
634 1997060300:00:00
635 1997061000:00:00
636 1997061700:00:00
637 1997062400:00:00
638
639 'every Tuesday in June'
640 __undef__
641 2000010100:00:00
642 2000123100:00:00
643 =>
644 2000060600:00:00
645 2000061300:00:00
646 2000062000:00:00
647 2000062700:00:00
648
649 '2nd Tuesday in June 1997'
650 =>
651 1997061000:00:00
652
653 '2nd Tuesday in June'
654 __undef__
655 2000010100:00:00
656 2000123100:00:00
657 =>
658 2000061300:00:00
659
660 'last Tuesday in June 1997'
661 =>
662 1997062400:00:00
663
664 'last Tuesday in June'
665 __undef__
666 2000010100:00:00
667 2000123100:00:00
668 =>
669 2000062700:00:00
670
671 'every Tuesday of every month in 1997'
672 __undef__
673 1997060100:00:00
674 1997063023:00:00
675 =>
676 1997060300:00:00
677 1997061000:00:00
678 1997061700:00:00
679 1997062400:00:00
680
681 'every Tuesday of every month'
682 __undef__
683 2000060100:00:00
684 2000063023:00:00
685 =>
686 2000060600:00:00
687 2000061300:00:00
688 2000062000:00:00
689 2000062700:00:00
690
691 '2nd Tuesday of every month in 1997'
692 __undef__
693 1997040100:00:00
694 1997063023:00:00
695 =>
696 1997040800:00:00
697 1997051300:00:00
698 1997061000:00:00
699
700 '2nd Tuesday of every month'
701 __undef__
702 2000040100:00:00
703 2000063023:00:00
704 =>
705 2000041100:00:00
706 2000050900:00:00
707 2000061300:00:00
708
709 'last Tuesday of every month in 1997'
710 __undef__
711 1997040100:00:00
712 1997063000:00:00
713 =>
714 1997042900:00:00
715 1997052700:00:00
716 1997062400:00:00
717
718 'last Tuesday of every month'
719 __undef__
720 2000040100:00:00
721 2000063000:00:00
722 =>
723 2000042500:00:00
724 2000053000:00:00
725 2000062700:00:00
726
727 'every day of every month in 1997'
728 __undef__
729 1997042900:00:00
730 1997050200:00:00
731 =>
732 1997042900:00:00
733 1997043000:00:00
734 1997050100:00:00
735 1997050200:00:00
736
737 'every day of every month'
738 __undef__
739 2000042900:00:00
740 2000050200:00:00
741 =>
742 2000042900:00:00
743 2000043000:00:00
744 2000050100:00:00
745 2000050200:00:00
746
747 '2nd day of every month in 1997'
748 __undef__
749 1997040100:00:00
750 1997070100:00:00
751 =>
752 1997040200:00:00
753 1997050200:00:00
754 1997060200:00:00
755
756 '2nd day of every month'
757 __undef__
758 2000040100:00:00
759 2000070100:00:00
760 =>
761 2000040200:00:00
762 2000050200:00:00
763 2000060200:00:00
764
765 'last day of every month in 1997'
766 __undef__
767 1997040100:00:00
768 1997070100:00:00
769 =>
770 1997043000:00:00
771 1997053100:00:00
772 1997063000:00:00
773
774 'last day of every month'
775 __undef__
776 2000040100:00:00
777 2000070100:00:00
778 =>
779 2000043000:00:00
780 2000053100:00:00
781 2000063000:00:00
782
783 'every day in 1997'
784 __undef__
785 1997042900:00:00
786 1997050200:00:00
787 =>
788 1997042900:00:00
789 1997043000:00:00
790 1997050100:00:00
791 1997050200:00:00
792
793 'every day'
794 __undef__
795 2000042900:00:00
796 2000050200:00:00
797 =>
798 2000042900:00:00
799 2000043000:00:00
800 2000050100:00:00
801 2000050200:00:00
802
803 'every 2nd day in 1997'
804 1997043000:00:00
805 1997042900:00:00
806 1997050200:00:00
807 =>
808 1997043000:00:00
809 1997050200:00:00
810
811 'every 2nd day'
812 2000043000:00:00
813 2000042900:00:00
814 2000050200:00:00
815 =>
816 2000043000:00:00
817 2000050200:00:00
818
819 'every 2 days in 1997'
820 1997043000:00:00
821 1997042900:00:00
822 1997050200:00:00
823 =>
824 1997043000:00:00
825 1997050200:00:00
826
827 'every 2 days'
828 2000043000:00:00
829 2000042900:00:00
830 2000050200:00:00
831 =>
832 2000043000:00:00
833 2000050200:00:00
834
835 ### Base date outside range
836
837 'every 2 days'
838 1997053000:00:00
839 1997042900:00:00
840 1997050200:00:00
841 =>
842 1997043000:00:00
843 1997050200:00:00
844
845 'every 2 days'
846 1997040200:00:00
847 1997042900:00:00
848 1997050200:00:00
849 =>
850 1997043000:00:00
851 1997050200:00:00
852
853 ### Ranges and negative values
854
855 0:0:0:2*12-13:0,30:0
856 1997053000:00:00
857 1997042900:00:00
858 1997050300:00:00
859 =>
860 1997043012:00:00
861 1997043012:30:00
862 1997043013:00:00
863 1997043013:30:00
864 1997050212:00:00
865 1997050212:30:00
866 1997050213:00:00
867 1997050213:30:00
868
869 0:1*2--2:2:12:0:0
870 __undef__
871 2000010100:00:00
872 2000022923:59:59
873 =>
874 2000011112:00:00
875 2000011812:00:00
876 2000020812:00:00
877 2000021512:00:00
878 2000022212:00:00
879
880 1:2*-1:4:12:0:0
881 2000010100:00:00
882 2000010100:00:00
883 2002123100:00:00
884 =>
885 2000012712:00:00
886 2001032912:00:00
887 2002053012:00:00
888
889 1*2:-1:4:12:0:0
890 2000010100:00:00
891 2000010100:00:00
892 2002123100:00:00
893 =>
894 2000022412:00:00
895 2001022212:00:00
896 2002022812:00:00
897
898 1:0*-3:4:12:00:00
899 2000010100:00:00
900 2000010100:00:00
901 2002123100:00:00
902 =>
903 2000121412:00:00
904 2001121312:00:00
905 2002121212:00:00
906
907 1*1:0:-2:12:0:0
908 2000010100:00:00
909 2000010100:00:00
910 2002123100:00:00
911 =>
912 2000013012:00:00
913 2001013012:00:00
914 2002013012:00:00
915
916 1*0:0:-2:12:0:0
917 2000010100:00:00
918 2000010100:00:00
919 2002123100:00:00
920 =>
921 2000123012:00:00
922 2001123012:00:00
923 2002123012:00:00
924
925 ### Modifiers
926
927 1*1:0:1:12:0:0
928 easter
929 __undef__
930 2000010100:00:00
931 2002123123:59:59
932 =>
933 2000042312:00:00
934 2001041512:00:00
935 2002033112:00:00
936
937 0:1*0:15:12:0:0
938 pd3
939 __undef__
940 2000010100:00:00
941 2000033123:59:59
942 =>
943 2000011212:00:00
944 2000020912:00:00
945 2000030812:00:00
946
947 0:1*0:15:12:0:0
948 pt3
949 __undef__
950 2000010100:00:00
951 2000033123:59:59
952 =>
953 2000011212:00:00
954 2000020912:00:00
955 2000031512:00:00
956
957 0:1*0:15:12:0:0
958 nd3
959 __undef__
960 2000010100:00:00
961 2000033123:59:59
962 =>
963 2000011912:00:00
964 2000021612:00:00
965 2000032212:00:00
966
967 0:1*0:15:12:0:0
968 nt3
969 __undef__
970 2000010100:00:00
971 2000033123:59:59
972 =>
973 2000011912:00:00
974 2000021612:00:00
975 2000031512:00:00
976
977 0:1*0:15:12:0:0
978 fd2
979 __undef__
980 2000010100:00:00
981 2000033123:59:59
982 =>
983 2000011712:00:00
984 2000021712:00:00
985 2000031712:00:00
986
987 0:1*0:15:12:0:0
988 bd2
989 __undef__
990 2000010100:00:00
991 2000033123:59:59
992 =>
993 2000011312:00:00
994 2000021312:00:00
995 2000031312:00:00
996
997 0:1*0:15:12:0:0
998 fw4
999 __undef__
1000 2000010100:00:00
1001 2000033123:59:59
1002 =>
1003 2000012412:00:00
1004 2000022212:00:00
1005 2000032112:00:00
1006
1007 0:1*0:15:12:0:0
1008 bw4
1009 __undef__
1010 2000010100:00:00
1011 2000033123:59:59
1012 =>
1013 2000011112:00:00
1014 2000020912:00:00
1015 2000030912:00:00
1016
1017 0:1*0:15:12:0:0
1018 nwd
1019 __undef__
1020 2000010100:00:00
1021 2000033123:59:59
1022 =>
1023 2000011812:00:00
1024 2000021512:00:00
1025 2000031512:00:00
1026
1027 0:1*0:15:12:0:0
1028 pwd
1029 __undef__
1030 2000010100:00:00
1031 2000033123:59:59
1032 =>
1033 2000011412:00:00
1034 2000021512:00:00
1035 2000031512:00:00
1036
1037 *2002:7:0:10:12:00:00
1038 cwd
1039 __undef__
1040 __undef__
1041 __undef__
1042 =>
1043 2002071112:00:00
1044
1045 *2002:7:0:10:12:00:00
1046 cwn
1047 __undef__
1048 __undef__
1049 __undef__
1050 =>
1051 2002071112:00:00
1052
1053 *2002:7:0:10:12:00:00
1054 cwp
1055 __undef__
1056 __undef__
1057 __undef__
1058 =>
1059 2002070912:00:00
1060
1061 *2002:7:0:20:12:00:00
1062 cwd
1063 __undef__
1064 __undef__
1065 __undef__
1066 =>
1067 2002071912:00:00
1068
1069 *2002:7:0:20:12:00:00
1070 cwn
1071 __undef__
1072 __undef__
1073 __undef__
1074 =>
1075 2002071912:00:00
1076
1077 *2002:7:0:20:12:00:00
1078 cwp
1079 __undef__
1080 __undef__
1081 __undef__
1082 =>
1083 2002071912:00:00
1084
1085 *2002:7:0:21:12:00:00
1086 cwd
1087 __undef__
1088 __undef__
1089 __undef__
1090 =>
1091 2002072212:00:00
1092
1093 *2002:7:0:21:12:00:00
1094 cwn
1095 __undef__
1096 __undef__
1097 __undef__
1098 =>
1099 2002072212:00:00
1100
1101 *2002:7:0:21:12:00:00
1102 cwp
1103 __undef__
1104 __undef__
1105 __undef__
1106 =>
1107 2002072212:00:00
1108
1109 *2002:7:0:5:12:00:00
1110 cwd
1111 __undef__
1112 __undef__
1113 __undef__
1114 =>
1115 2002070312:00:00
1116
1117 *2002:7:0:5:12:00:00
1118 cwn
1119 __undef__
1120 __undef__
1121 __undef__
1122 =>
1123 2002070312:00:00
1124
1125 *2002:7:0:5:12:00:00
1126 cwp
1127 __undef__
1128 __undef__
1129 __undef__
1130 =>
1131 2002070312:00:00
1132
1133 *2003:7:0:5:12:00:00
1134 cwd
1135 __undef__
1136 __undef__
1137 __undef__
1138 =>
1139 2003070712:00:00
1140
1141 *2003:7:0:5:12:00:00
1142 cwn
1143 __undef__
1144 __undef__
1145 __undef__
1146 =>
1147 2003070712:00:00
1148
1149 *2003:7:0:5:12:00:00
1150 cwp
1151 __undef__
1152 __undef__
1153 __undef__
1154 =>
1155 2003070312:00:00
1156
1157 *2002:7:0:10:12:00:00
1158 nwd
1159 __undef__
1160 __undef__
1161 __undef__
1162 =>
1163 2002071012:00:00
1164
1165 *2002:7:0:10:12:00:00
1166 pwd
1167 __undef__
1168 __undef__
1169 __undef__
1170 =>
1171 2002071012:00:00
1172
1173 *2002:7:0:10:12:00:00
1174 dwd
1175 __undef__
1176 __undef__
1177 __undef__
1178 =>
1179 2002071012:00:00
1180
1181 *2002:7:0:20:12:00:00
1182 nwd
1183 __undef__
1184 __undef__
1185 __undef__
1186 =>
1187 2002072212:00:00
1188
1189 *2002:7:0:20:12:00:00
1190 pwd
1191 __undef__
1192 __undef__
1193 __undef__
1194 =>
1195 2002071912:00:00
1196
1197 *2002:7:0:20:12:00:00
1198 dwd
1199 __undef__
1200 __undef__
1201 __undef__
1202 =>
1203 2002071912:00:00
1204
1205 *2002:7:0:21:12:00:00
1206 nwd
1207 __undef__
1208 __undef__
1209 __undef__
1210 =>
1211 2002072212:00:00
1212
1213 *2002:7:0:21:12:00:00
1214 pwd
1215 __undef__
1216 __undef__
1217 __undef__
1218 =>
1219 2002071912:00:00
1220
1221 *2002:7:0:21:12:00:00
1222 dwd
1223 __undef__
1224 __undef__
1225 __undef__
1226 =>
1227 2002072212:00:00
1228
1229 *2002:7:0:5:12:00:00
1230 nwd
1231 __undef__
1232 __undef__
1233 __undef__
1234 =>
1235 2002070512:00:00
1236
1237 *2002:7:0:5:12:00:00
1238 pwd
1239 __undef__
1240 __undef__
1241 __undef__
1242 =>
1243 2002070512:00:00
1244
1245 *2002:7:0:5:12:00:00
1246 dwd
1247 __undef__
1248 __undef__
1249 __undef__
1250 =>
1251 2002070512:00:00
1252
1253 *2003:7:0:5:12:00:00
1254 nwd
1255 __undef__
1256 __undef__
1257 __undef__
1258 =>
1259 2003070712:00:00
1260
1261 *2003:7:0:5:12:00:00
1262 pwd
1263 __undef__
1264 __undef__
1265 __undef__
1266 =>
1267 2003070312:00:00
1268
1269 *2003:7:0:5:12:00:00
1270 dwd
1271 __undef__
1272 __undef__
1273 __undef__
1274 =>
1275 2003070712:00:00
1276
1277 ### Test dates that modifers/rtimes push outside the range
1278 ### and dates that started outside the range, but modifiers
1279 ### and rtimes pushed inside
1280
1281 0:0:0:3*0:0:0
1282 bd2
1283 1999020200:00:00
1284 1999020100:00:00
1285 1999020800:00:00
1286 =>
1287 1999020300:00:00
1288 1999020600:00:00
1289
1290 0:0:1:0:0:0:0
1291 __undef__
1292 2011-03-01
1293 2011-03-10
1294 =>
1295 2011030100:00:00
1296 2011030800:00:00
1297
1298 ### Test slow dates with base dates outside the range.
1299
1300 0:2*4--1:2:0:0:0
1301 2011020100:00:00
1302 2011070100:00:00
1303 2011110100:00:00
1304 =>
1305 2011082300:00:00
1306 2011083000:00:00
1307 2011102500:00:00
1308
1309 0:2*4--1:2:0:0:0
1310 2011120100:00:00
1311 2011070100:00:00
1312 2011110100:00:00
1313 =>
1314 2011082300:00:00
1315 2011083000:00:00
1316 2011102500:00:00
1317
1318 0:2*5--1:2:0:0:0
1319 2011010100:00:00
1320 2011020100:00:00
1321 2011110100:00:00
1322 =>
1323 2011032900:00:00
1324 2011053100:00:00
1325
1326 ### Test wd/ibd/nbd flags
1327
1328 0:0:0:9:0:0:0
1329 wd2
1330 2010010500:00:00
1331 2010010100:00:00
1332 2010022500:00:00
1333 =>
1334 2010010500:00:00
1335 2010011200:00:00
1336 2010011900:00:00
1337 2010020200:00:00
1338 2010020900:00:00
1339 2010021600:00:00
1340 2010022300:00:00
1341
1342 0:0:0:9:0:0:0
1343 ibd
1344 2010010500:00:00
1345 2010010100:00:00
1346 2010022500:00:00
1347 =>
1348 2010010500:00:00
1349 2010011400:00:00
1350 2010020100:00:00
1351 2010021000:00:00
1352 2010021900:00:00
1353
1354 0:0:0:9:0:0:0
1355 nbd
1356 2010010500:00:00
1357 2010010100:00:00
1358 2010022500:00:00
1359 =>
1360 2010012300:00:00
1361
1362 ### Test invalid frequency
1363
1364 0*11:0:31:0:0:0
1365 __undef__
1366 now
1367 2028-11-22
1368 =>
1369 '[_locate_n] Unable to find an interval in 100 attempts'
1370
1371 ### Empty
1372 0:0:0:1*17:00:00
1373 2020101000:00:00
1374 2020101000:00:00
1375 2020101000:00:00
1376 =>
1377
1378 ";
1379
1380 $::ti->tests(func => \&test,
1381 tests => $tests);
1382 $::ti->done_testing();
1383
1384 #Local Variables:
1385 #mode: cperl
1386 #indent-tabs-mode: nil
1387 #cperl-indent-level: 3
1388 #cperl-continued-statement-offset: 2
1389 #cperl-continued-brace-offset: 0
1390 #cperl-brace-offset: 0
1391 #cperl-brace-imaginary-offset: 0
1392 #cperl-label-offset: 0
1393 #End: