feat(services): add monday-friday working day determiner
This commit is contained in:
26
app/Services/WorkingDays/WorkingDayDeterminerInterface.php
Normal file
26
app/Services/WorkingDays/WorkingDayDeterminerInterface.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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;
|
||||
}
|
||||
Reference in New Issue
Block a user