panlatent / cron-expression-descriptor
Converts cron expressions into human readable descriptions.
Installs: 329 863
Dependents: 3
Suggesters: 0
Security: 0
Stars: 16
Watchers: 2
Forks: 5
Open Issues: 1
Requires
- php: ^7.1|^8.0
- ext-ctype: *
- ext-intl: *
- myclabs/php-enum: ~1.5
Requires (Dev)
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^7.5|^8.0
Suggests
- ext-intl: Help translate cron express description
README
Converts cron expressions into human readable descriptions in PHP.
The library is PHP version of bradymholt/cron-expression-descriptor (C#).
Installation
It's recommended that you use Composer to install this project.
$ composer require panlatent/cron-expression-descriptor
This will install the library and all required dependencies. The project requires PHP 7.1 or newer.
Usage
echo (new Panlatent\CronExpressionDescriptor\ExpressionDescriptor('23 12 * JAN *'))->getDescription(); // OUTPUT: At 12:23 PM, only in January
Ports
This library has been ported to several other languages.
- C# - https://github.com/bradymholt/cron-expression-descriptor
- JavaScript - https://github.com/bradymholt/cRonstrue
- Java - https://github.com/RedHogs/cron-parser
- Java - https://github.com/voidburn/cron-expression-descriptor
- Ruby - https://github.com/alpinweis/cronex
- Python - https://github.com/Salamek/cron-descriptor
- Go - https://github.com/lnquy/cron
License
The Cron Expression Descriptor is open-sourced software licensed under the MIT license.