ogsoft-example/app/Services/WorkingDays/WorkingDayDeterminerInterface.php

27 lines
622 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace App\Services\WorkingDays;
/**
* Determinate if a given date is a working day.
*/
interface WorkingDayDeterminerInterface
{
/**
* Determinate if a given date is a working day.
* @param \DateTimeImmutable $date
* @return bool
*/
public function isWorkingDay(\DateTimeImmutable $date): bool;
/**
* Get working days count in a given interval.
* @param \DateTimeImmutable $startDate
* @param int $workingDays
* @return int
*/
public function getWorkingDaysCount(\DateTimeImmutable $startDate, int $workingDays): int;
}