dev-develop
dev-develop https://github.com/webino/WebinoNameDayLib.gitName day Library
The Requires
- php >=5.3.3
name day lib webino
Name day Library
Provides API to resolve name day. Still under development. (currently only Slovak), (*2)
Following steps are necessary to get this library working:, (*3)
Add "minimum-stability": "dev"
to your composer.json, because this lib is under development, (*4)
Run php composer.phar require webino/webino-name-day-lib:dev-develop
, (*5)
// Create the name day service $locale = 'sk_SK'; $factory = new \WebinoNameDayLib\Factory; $nameDay = $factory->create($locale); // Get the name day $result = $nameDay->today(); // Holy day logic (optional) if ($result->isHolyDay()) { $text = 'Today is'; } else { $text = 'Name-day today celebrating'; } // Name day of the day $result->getName(); // Get tomorrow name day $result = $nameDay->tomorrow(); // Get today & tomorrow name day $arrayOfResults = $nameDay->combo();
NameDayResult today($date = 'now')
NameDayResult tomorrow($date = 'now')
array[NameDayResult, NameDayResult] combo($date = 'now')
DateTime nameDate($name)
DateTime nearestNameDate($name)
string getName()
bool isHolyDay()
Requirements, (*6)
Setup, (*7)
Clone this repository and run: phing update
, (*8)
Now your development environment is set., (*9)
Open project in the (NetBeans) IDE, (*10)
Adding region names, (*11)
\WebinoNameDayLib\Region\Sk
\WebinoNameDayLib\Region\AbstractNames
Testing, (*12)
phpunit
in the test directoryRun phing test
in the module directory to run the tests and code insights, (*13)
NOTE: To run the code insights there are some tool requirements., (*14)
Please, if you are interested in this library report any issues and don't hesitate to contribute., (*15)
Name day Library
name day lib webino