upgrade icalparser from e6a3a285cf6e239236a40153a66b67b940220b43 to cae1631b9496a7415ef960b0dff1cd0f39fe3135

This commit is contained in:
root 2022-04-19 21:15:47 +02:00 committed by Florian Schlegel
parent 2395e88e36
commit e2541c84e4
31 changed files with 1329 additions and 877 deletions

View file

@ -7,26 +7,36 @@
<title>Ical Parser example</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<div class="container">
<h1>Czech holidays</h1>
<ul>
<table class="table table-bordered">
<thead>
<tr>
<th class="text-end">Date</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
<?php
use om\IcalParser;
require_once __DIR__ . '/../vendor/autoload.php';
$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->getSortedEvents() as $r) {
echo sprintf(' <li>%s - %s</li>' . PHP_EOL, $r['DTSTART']->format('j.n.Y'), $r['SUMMARY']);
$cal = new 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('<tr><th class="text-end">%s</th><td>%s</td></tr>', $event['DTSTART']->format('j.n.Y'), $event['SUMMARY']);
}
?></ul>
?>
</tbody>
</table>
</div>
</body>
</html>
</html>