This package is for determining a UK employee tax allowance for a specific date range.
You may get weekly or monthly number of allowance, as well as weekly or monthly period end dates for the provided date range.
composer require worksome/uk-tax-allowance
/**
* @param \Worksome\UkTaxAllowance\UkTaxAllowanceCalculator $ukTaxAllowanceCalculator
* @param $dateStart \Carbon\Carbon
* @param $dateEnd \Carbon\Carbon
*/
// Get weekly allowance count for a specific date range
$weeklyAllowanceCount = $ukTaxAllowanceCalculator->weekly($dateStart, $dateEnd);
// Get weekly allowance end dates for a specific date range
$weeklyAllowanceEndDates = $ukTaxAllowanceCalculator->weeklyEndDatesBetween($dateStart, $dateEnd);
// Get monthly allowance end dates for a specific date range
$monthlyAllowanceEndDates = $ukTaxAllowanceCalculator->monthlyEndDatesBetween($dateStart, $dateEnd);
// Get monthly allowance count for a specific date range
$monthlyAllowanceCount = $ukTaxAllowanceCalculator->monthly($dateStart, $dateEnd);
You may use our YasumiUkCalendar which relies on the azuyalabs/yasumi package. For Laravel users, UkTaxAllowanceServiceProvider
will register it by default.
Or create your own and have it implement Worksome\UkTaxAllowance\Contracts\UkCalendar