PHP code example of worksome / uk-tax-allowance

1. Go to this page and download the library: Download worksome/uk-tax-allowance library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

worksome / uk-tax-allowance example snippets


/**
 * @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);