Revert "upgrade icalparser from e6a3a285cf6e239236a40153a66b67b940220b43 to cae1631b9496a7415ef960b0dff1cd0f39fe3135"
This reverts commit e3db4803e0
.
This commit is contained in:
parent
a90a7b111d
commit
2395e88e36
31 changed files with 876 additions and 1328 deletions
|
@ -1,58 +1,44 @@
|
|||
# PHP iCal Parser
|
||||
|
||||
[](https://github.com/OzzyCzech/icalparser/actions)
|
||||
[](https://packagist.org/packages/om/icalparser)
|
||||
[](https://packagist.org/packages/om/icalparser)
|
||||
[](https://packagist.org/packages/om/icalparser)
|
||||
[](https://packagist.org/packages/om/icalparser)
|
||||
[](https://travis-ci.org/OzzyCzech/icalparser) [](https://packagist.org/packages/om/icalparser) [](https://packagist.org/packages/om/icalparser) [](https://packagist.org/packages/om/icalparser) [](https://packagist.org/packages/om/icalparser)
|
||||
|
||||
Internet Calendaring Parser [rfc2445](https://www.ietf.org/rfc/rfc2445.txt) or iCal parser is simple PHP 7.4+ class for parsing format into array.
|
||||
Internet Calendaring Parser [rfc2445](http://www.ietf.org/rfc/rfc2445.txt) or iCal parser is simple PHP 5.6+ class for parsing format into array.
|
||||
|
||||
## How to install
|
||||
|
||||
The recommended way to is via Composer:
|
||||
|
||||
```shell script
|
||||
```bash
|
||||
composer require om/icalparser
|
||||
```
|
||||
|
||||
## Usage and example
|
||||
## Usage
|
||||
|
||||
```php
|
||||
<?php
|
||||
use om\IcalParser;
|
||||
require_once '../vendor/autoload.php';
|
||||
|
||||
$cal = new IcalParser();
|
||||
$cal = new \om\IcalParser();
|
||||
$results = $cal->parseFile(
|
||||
'https://www.google.com/calendar/ical/cs.czech%23holiday%40group.v.calendar.google.com/public/basic.ics'
|
||||
);
|
||||
|
||||
foreach ($cal->getEvents()->sorted() as $event) {
|
||||
printf('%s - %s' . PHP_EOL, $event['DTSTART']->format('j.n.Y'), $event['SUMMARY']);
|
||||
|
||||
foreach ($cal->getSortedEvents() as $r) {
|
||||
echo sprintf(' <li>%s - %s</li>' . PHP_EOL, $r['DTSTART']->format('j.n.Y'), $r['SUMMARY']);
|
||||
}
|
||||
```
|
||||
|
||||
You can run example with [PHP Built-in web server](https://www.php.net/manual/en/features.commandline.webserver.php) as follow:
|
||||
|
||||
```shell
|
||||
php -S localhost:8000 -t example
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 7.4+
|
||||
- PHP 5.6+
|
||||
|
||||
## Run tests
|
||||
|
||||
iCal parser using [Nette Tester](https://github.com/nette/tester). The tests can be invoked via [composer](https://getcomposer.org/).
|
||||
iCal parser using [Nette Tester](https://github.com/nette/tester).
|
||||
The tests can be invoked via [composer](https://getcomposer.org/).
|
||||
|
||||
```shell script
|
||||
```bash
|
||||
composer update
|
||||
composer test
|
||||
composer tests
|
||||
```
|
||||
|
||||
|
||||
## TODO
|
||||
|
||||
- add ATTENDEE support https://www.kanzaki.com/docs/ical/attendee.html
|
||||
- add ATTENDEE support http://www.kanzaki.com/docs/ical/attendee.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue