getsky / airac
AIRAC generation
v1.1.3
2021-05-14 09:46 UTC
Requires
- php: ^7.4 || ^8.0
Requires (Dev)
- phpunit/phpunit: 9.3.*
- squizlabs/php_codesniffer: 3.1.*
This package is not auto-updated.
Last update: 2025-02-15 06:40:00 UTC
README
This generator helps you to count the date AIRAC. it's very easy:
<?php use GetSky\AIRAC\AiracProducer; $producer = new AiracProducer(); $nowAirac = $producer->now(new DateTime('2018-04-05')); // or $nowAirac = $producer->nowByNumber('1804'); // return Airac with dateStart 2018-03-29 and number 1804 $nextAirac = $producer->next(new DateTime('2018-01-10')); // or $nextAirac = $producer->nextByNumber('1801'); // or $airac = $producer->now(new DateTime('2018-01-10')); $nextAirac = $producer->nextByAirac($airac); // return Airac with dateStart 2018-02-01 and number 1802 $lastAirac = $producer->last(new DateTime('2018-01-10')); // or $lastAirac = $producer->lastByNumber('1801'); // or $airac = $producer->now(new DateTime('2018-01-10')); $nextAirac = $producer->lastByAirac($airac); // return Airac with dateStart 2017-12-07 and number 1713
Installation
Run command:
composer require getsky/airac
Or add string in your composer.json:
"getsky/airac": "dev-master"
Change bearing date
You can change the reference date to shift your cycles:
<?php use GetSky\AIRAC\AiracProducer; $producer = new AiracProducer(new DateTime('2015-01-22')); // now cycle shifted by 14 days