rovangju / carbon-fy
Carbon DateTime extension to determine fiscal year (FY)
Installs: 3 641
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 3
Open Issues: 2
Requires
- php: >=5.3.3
- nesbot/carbon: ~1.0
Requires (Dev)
- phpunit/phpunit: ~3.4
This package is auto-updated.
Last update: 2024-12-05 12:14:17 UTC
README
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!
Overview
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:
Basic usage
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 */