Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | protected function matchDateRange($begin, $end) |
||
36 | { |
||
37 | if ($begin > $end) { |
||
38 | throw new RunTimeException('End date cannot be before start date'); |
||
39 | } |
||
40 | |||
41 | $now = date('Y-m-d'); |
||
42 | |||
43 | if ($now < $begin) { |
||
44 | return false; |
||
45 | } |
||
46 | |||
47 | if ($end < $now) { |
||
48 | return false; |
||
49 | } |
||
50 | |||
51 | return true; |
||
52 | } |
||
53 | } |
||
54 |