PHP code example of rovangju / carbon-fy

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

    

rovangju / carbon-fy example snippets



use CarbonExt\FiscalYear\Calculator;

$c = new Calculator(7, 1); /* FY starts on July 1 */

$c->get(new Carbon('2015-01-01')); /* 2015-06-29 */
$c->get(new Carbon('2015-07-01')); /* 2016-06-29 */