|
@@ 428-436 (lines=9) @@
|
| 425 |
|
$this->trigger_p1_end |
| 426 |
|
); |
| 427 |
|
|
| 428 |
|
if (false !== $intersect_p1) { |
| 429 |
|
$period_length = 1 + BAB_DateTime::dateDiffIso($intersect_p1['begin'], $intersect_p1['end']); |
| 430 |
|
// + 1 for end day |
| 431 |
|
if ($period_length < $entry['total']) { |
| 432 |
|
$nbdays += $period_length; |
| 433 |
|
} else { |
| 434 |
|
$nbdays += $entry['total']; |
| 435 |
|
} |
| 436 |
|
} |
| 437 |
|
|
| 438 |
|
$intersect_p2 = BAB_DateTime::periodIntersect( |
| 439 |
|
$entry['date_begin'], |
|
@@ 445-453 (lines=9) @@
|
| 442 |
|
$this->trigger_p2_end |
| 443 |
|
); |
| 444 |
|
|
| 445 |
|
if (false !== $intersect_p2) { |
| 446 |
|
$period_length = 1 + BAB_DateTime::dateDiffIso($intersect_p2['begin'], $intersect_p2['end']); |
| 447 |
|
// + 1 for end day |
| 448 |
|
if ($period_length < $entry['total']) { |
| 449 |
|
$nbdays += $period_length; |
| 450 |
|
} else { |
| 451 |
|
$nbdays += $entry['total']; |
| 452 |
|
} |
| 453 |
|
} |
| 454 |
|
} |
| 455 |
|
|
| 456 |
|
if ( '' !== $this->trigger_nbdays_min && '' !== $this->trigger_nbdays_max && $this->trigger_nbdays_min <= $nbdays && $nbdays < $this->trigger_nbdays_max ) { |