1 | <?php |
||
12 | abstract class DateRange implements Iterator, Countable |
||
13 | { |
||
14 | /** @var DateTime */ |
||
15 | protected $start; |
||
16 | 14 | /** @var DateTime */ |
|
17 | protected $end; |
||
18 | 14 | /** @var array */ |
|
19 | protected $dates = []; |
||
20 | |||
21 | 12 | public function start(): DateTimeImmutable |
|
25 | |||
26 | 3 | public function end(): DateTimeImmutable |
|
30 | |||
31 | 9 | public function getPeriod($interval = 'P1D', DateTimeImmutable $start = null, DateTimeImmutable $end = null): DatePeriod |
|
43 | 9 | ||
44 | public function equals(self $period): bool |
||
48 | 2 | ||
49 | public function overlaps(self $period): bool |
||
53 | 1 | ||
54 | public function isCurrent(): bool |
||
60 | 1 | ||
61 | public function current() |
||
65 | 3 | ||
66 | public function next() |
||
70 | 3 | ||
71 | 3 | public function key() |
|
75 | 3 | ||
76 | public function valid() |
||
80 | 3 | ||
81 | public function rewind() |
||
85 | 3 | ||
86 | 3 | public function count() |
|
90 | } |
||
91 |