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