https://github.com/endroid/calendar
Calendar reader / writer
https://github.com/endroid/calendar
Last synced: about 1 year ago
JSON representation
Calendar reader / writer
- Host: GitHub
- URL: https://github.com/endroid/calendar
- Owner: endroid
- License: mit
- Created: 2015-07-27T19:55:38.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2025-01-28T21:33:47.000Z (over 1 year ago)
- Last Synced: 2025-03-25T10:05:26.083Z (over 1 year ago)
- Language: PHP
- Homepage: https://endroid.nl/
- Size: 85 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Calendar
*By [endroid](https://endroid.nl/)*
[](https://packagist.org/packages/endroid/calendar)
[](https://github.com/endroid/calendar/actions)
[](https://packagist.org/packages/endroid/calendar)
[](https://packagist.org/packages/endroid/calendar)
[](https://packagist.org/packages/endroid/calendar)
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](https://getcomposer.org/) to install the library.
``` bash
$ composer require endroid/calendar
```
## Usage
```php
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.