29 lines
		
	
	
		
			782 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			782 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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;
 | 
						|
}
 |