mirror of
https://gh.wpcy.net/https://github.com/LJPc-solutions/freescout-calendar-module.git
synced 2026-05-25 00:54:16 +08:00
19 lines
348 B
PHP
19 lines
348 B
PHP
<?php
|
|
|
|
namespace Modules\LJPcCalendarModule\Http\Helpers;
|
|
|
|
use DateTimeImmutable;
|
|
|
|
class DateTimeRange {
|
|
public static function isAllDay( DateTimeImmutable $start, DateTimeImmutable $end ): bool {
|
|
if ( $start === $end ) {
|
|
return true;
|
|
}
|
|
|
|
$diff = $end->getTimestamp() - $start->getTimestamp();
|
|
|
|
return $diff > 86280;
|
|
|
|
|
|
}
|
|
}
|