endroid / calendar
Endroid Calendar
Fund package maintenance!
endroid
Installs: 11 651
Dependents: 3
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^8.2
Requires (Dev)
- endroid/quality: dev-main
Suggests
- roave/security-advisories: Avoids installation of package versions with vulnerabilities
This package is auto-updated.
Last update: 2024-12-19 21:50:09 UTC
README
By endroid
This library helps reading and writing calendars from and to different formats. To this end each reader converts the source to a generic calendar representation which can in turn be written to any available calendar format using one of the available writers.
Note: at this moment only read from Google Calendar is available.
Installation
Use Composer to install the library.
$ composer require endroid/calendar
Usage
<?php use Endroid\Calendar\Reader\IcalReader; $reader = new IcalReader(); // Read from URL or path $calendar = $reader->readFromUrl('https://domain/calendar.ics'); $calendar = $reader->readFromPath(__DIR__.'/calendar.ics'); $dateStart = new \DateTimeImmutable('2016-01-01'); $dateEnd = new \DateTimeImmutable('2016-12-31'); $events = $calendar->getEvents($dateStart, $dateEnd);
Versioning
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.
License
This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.