free-elephants / altera
0.11.1
2016-01-10 17:41 UTC
Requires
Requires (Dev)
- phpunit/phpunit: ^5.1
This package is not auto-updated.
Last update: 2024-12-21 19:21:25 UTC
README
This Project implements MagicGreenHat/Kingdom#38 , but can be useful in any php application, that need customizable Calendar (not traditional).
Features
- Custom number of named months in year.
- Custom number of days for every month.
- Seasons are supported.
- Well designed, implentated via TDD (and therefore 100% covered with tests), compliant with psr's.
Usage
Via composer:
composer require free-elephants/altera
Build new Calendar instanse with Builder:
<?php use FreeElephants\AltEra\Builder\MonthAwareCalendarBuilder; // Lets create calendar with 3 differance months $builder = new MonthAwareCalendarBuilder("3 Months Based Calendar"); $builder->addMonth("first", 10) ->addMonth("middle", 11) ->addMonth("last", 12); $calendar = $builder->getCalendar(); $calendar->getName(); // will return "3 Months Based Calendar" $calendar->getNumberOfDaysInYear(); // will return "33" - sum of days in all months
Author
samizdam samizdam@inbox.ru