| @@ 380-392 (lines=13) @@ | ||
| 377 | * @param \DateTime $date |
|
| 378 | * @return bool |
|
| 379 | */ |
|
| 380 | public function dateIsEarlier(\DateTime $date) { |
|
| 381 | $dateEarlier = FALSE; |
|
| 382 | ||
| 383 | $t1 = $this->start_date->getTimeStamp(); |
|
| 384 | ||
| 385 | $t3 = $date->getTimeStamp(); |
|
| 386 | ||
| 387 | if ($t3 < $t1) { |
|
| 388 | $dateEarlier = TRUE; |
|
| 389 | } |
|
| 390 | ||
| 391 | return $dateEarlier; |
|
| 392 | } |
|
| 393 | ||
| 394 | /** |
|
| 395 | * Checks if the date supplied ends after our event ends |
|
| @@ 437-449 (lines=13) @@ | ||
| 434 | * @param \DateTime $date |
|
| 435 | * @return bool |
|
| 436 | */ |
|
| 437 | public function startsEarlier(\DateTime $date) { |
|
| 438 | $earlier = FALSE; |
|
| 439 | ||
| 440 | $t1 = $this->start_date->getTimeStamp(); |
|
| 441 | ||
| 442 | $t3 = $date->getTimestamp(); |
|
| 443 | ||
| 444 | if ($t1 < $t3) { |
|
| 445 | $earlier = TRUE; |
|
| 446 | } |
|
| 447 | ||
| 448 | return $earlier; |
|
| 449 | } |
|
| 450 | ||
| 451 | /** |
|
| 452 | * Based on the start and end dates of the event it creates the appropriate granular events |
|