mirror of
https://github.com/simshaun/recurr.git
synced 2025-01-29 13:47:33 +01:00
Recurr
Recurr is a PHP library for working with recurrence rules that results in PHP \DateTime objects. Use it to help build a calendar with recurring events!
Installation
Recurr is hosted on packagist, meaning you can install it with Composer.
Create a composer.json file
{
"require": {
"simshaun/recurr": "dev-master"
}
}
Install composer and run it
wget http://getcomposer.org/composer.phar
php composer.phar install
(Optional) Autoload Recurr
require 'vendor/autoload.php';
Demo
$timezone = 'America/New_York';
$startDate = new \DateTime('2013-06-12 20:00:00', new \DateTimeZone($timezone));
$rule = new \Recurr\RecurrenceRule('FREQ=MONTHLY;COUNT=5', $startDate, $timezone);
$transformer = new \Recurr\RecurrenceRuleTransformer($rule);
print_r($transformer->getComputedArray());
Contribute
Recurr is still in beta, and is most likely not 100% free of bugs. Feel free to comment or make pull requests. Please include tests with PRs.
License
Recurr is licensed under the MIT License. See the LICENSE file for details.
Description
PHP library for working with recurrence rules (RRULE); meant to help with recurring calendar events.
Readme
Multiple Licenses
674 KiB
Languages
PHP
99.8%