mirror of
https://gh.wpcy.net/https://github.com/LJPc-solutions/freescout-calendar-module.git
synced 2026-07-17 09:18:37 +08:00
19 lines
369 B
PHP
19 lines
369 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 === 86400 || $diff === 86399;
|
|
|
|
|
|
}
|
|
}
|