PHP code example of roussks / financial-year
1. Go to this page and download the library: Download roussks/financial-year 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 example snippets
// DateTimeAdapter
// If instantiating with string, it must be of ISO-8601 format 'YYYY-MM-DD'
$startDate = new \DateTime('2019-01-01');
$fy = new \RoussKS\FinancialYear\DateTimeAdapter('calendar', $startDate);
echo $fy->getFyEndDate()->format('Y-m-d'); // 2019-12-31