Don't reinvent the wheel on that funky date logic to determine what fiscal year it is, or what fiscal year something happened in. This simple package has your back!
The ideal usage scenario would be to use a single instance of the calculator, as most organizations observe a single FY for their accounting.
Usage is pretty straight forward:
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 */