feat(services): add public holidays states infra
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\WorkingDays\PublicHolidays;
|
||||
|
||||
use App\Models\NonWorkingDays;
|
||||
|
||||
/**
|
||||
* Interface for determining public holidays in a given interval/day.
|
||||
*/
|
||||
interface PublicHolidaysStateDeterminerInterface
|
||||
{
|
||||
/**
|
||||
* Checks if a given date is a public holiday.
|
||||
* @param \DateTimeImmutable $publicHolidayDate
|
||||
* @return bool
|
||||
*/
|
||||
public function isPublicHoliday(\DateTimeImmutable $publicHolidayDate): bool;
|
||||
|
||||
/**
|
||||
* Check if is a public holiday in a given interval.
|
||||
* @param \DateTimeImmutable $startDate
|
||||
* @param \DateTimeImmutable $endDate
|
||||
* @return array<NonWorkingDays>
|
||||
*/
|
||||
public function getPublicHolidaysInInterval(\DateTimeImmutable $startDate, \DateTimeImmutable $endDate): array;
|
||||
}
|
||||
Reference in New Issue
Block a user