PHP code example of roussks / financial-year-carbon

1. Go to this page and download the library: Download roussks/financial-year-carbon 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/ */

    

roussks / financial-year-carbon example snippets




// CarbonAdapter
// If instantiating with string, it must be of ISO-8601 format 'YYYY-MM-DD'
$startDate = new \Carbon\Carbon::createFromDate('2019-01-01');

$fy = new \RoussKS\FinancialYear\CarbonAdapter('calendar', $startDate);

echo $fy->getFyEndDate()->toDateString(); // 2019-12-31