worksome / uk-tax-allowance
A package helping in determining the Uk weekly or monthly tax allowance for a specific date range
v2.0.0
2026-03-12 13:29 UTC
Requires
- php: ^8.4
- azuyalabs/yasumi: ^2.10
Requires (Dev)
- larastan/larastan: ^3.9
- nunomaduro/collision: ^7.10 || ^8.1.1
- orchestra/testbench: ^10.8 || ^11.0
- pestphp/pest: ^4.4
- pestphp/pest-plugin-laravel: ^4.1
- worksome/coding-style: ^3.4
This package is auto-updated.
Last update: 2026-03-12 13:32:31 UTC
README
This package is for determining a UK employee tax allowance for a specific date range.
You may get the weekly or monthly tax allowance, as well as weekly or monthly period end dates for the provided date range.
Installation
composer require worksome/uk-tax-allowance
Usages
UkTaxAllowanceCalculator
/** * @param \Worksome\UkTaxAllowance\UkTaxAllowanceCalculator $ukTaxAllowanceCalculator * @param $dateStart \Carbon\Carbon * @param $dateEnd \Carbon\Carbon */
Weekly allowance
// Get the weekly allowance count for a specific date range $weeklyAllowanceCount = $ukTaxAllowanceCalculator->weekly($dateStart, $dateEnd); // Get the weekly allowance end dates for a specific date range $weeklyAllowanceEndDates = $ukTaxAllowanceCalculator->weeklyEndDatesBetween($dateStart, $dateEnd);
Monthly allowance
// Get the monthly allowance end dates for a specific date range $monthlyAllowanceEndDates = $ukTaxAllowanceCalculator->monthlyEndDatesBetween($dateStart, $dateEnd); // Get the monthly allowance count for a specific date range $monthlyAllowanceCount = $ukTaxAllowanceCalculator->monthly($dateStart, $dateEnd);
Calendar
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