All Projects → OzzyCzech → icalparser

OzzyCzech / icalparser

Licence: BSD-3-Clause license
Simple ical parser for PHP

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to icalparser

THCalendar
Calendar like iOS
Stars: ✭ 21 (-62.5%)
Mutual labels:  icalendar, ical
rrule
🔁 Recurrence rule parsing & calculation as defined in the iCalendar RFC
Stars: ✭ 31 (-44.64%)
Mutual labels:  icalendar, ical
ical
📅 Golang iCalendar lexer/parser implementing RFC 5545
Stars: ✭ 28 (-50%)
Mutual labels:  icalendar, ical
iCalKit
📅 Parse and generate iCalendar (.ics) files in Swift
Stars: ✭ 54 (-3.57%)
Mutual labels:  icalendar, ical
node-ical
NodeJS class for parsing iCalendar/ICS files
Stars: ✭ 53 (-5.36%)
Mutual labels:  icalendar, ical
remarkable-calendar-creator
Create calendars to display on a reMarkable device as the suspend screen or to write notes on, including events from your own online iCal calendar
Stars: ✭ 28 (-50%)
Mutual labels:  icalendar, ical
webcalendar
WebCalendar is a PHP application used to maintain a calendar for a single user or an intranet group of users. It can also be configured as an event calendar.
Stars: ✭ 113 (+101.79%)
Mutual labels:  icalendar
weather-calendar-feed
Display yr.no weather (supports the entire Earth) forecasts with highly customizable Event titles in your Google Calendar, Android phone, iPhone, Outlook or other iCalendar app
Stars: ✭ 16 (-71.43%)
Mutual labels:  icalendar
calcardbackup
calcardbackup: moved to https://codeberg.org/BernieO/calcardbackup
Stars: ✭ 67 (+19.64%)
Mutual labels:  icalendar
icsdb
Open repository of non-working days ics files
Stars: ✭ 20 (-64.29%)
Mutual labels:  icalendar
ics-to-json
📅 Convert ICS calendars (eg. Google Calendar) to an opinionated JSON format.
Stars: ✭ 36 (-35.71%)
Mutual labels:  ical
Radicale
A simple CalDAV (calendar) and CardDAV (contact) server.
Stars: ✭ 2,268 (+3950%)
Mutual labels:  icalendar
cocktail
Elixir date recurrence library based on iCalendar events
Stars: ✭ 115 (+105.36%)
Mutual labels:  icalendar
python-jicson
python ics to json lib
Stars: ✭ 11 (-80.36%)
Mutual labels:  icalendar
jpl-space-calendar
An app for parsing and publishing the JPL Space Calendar in JSON and ICalendar formats.
Stars: ✭ 13 (-76.79%)
Mutual labels:  icalendar
NUAA ClassSchedule
NUAA_ClassSchedule 登录南京航空航天大学新教务系统,获取课表及考试信息,解析后生成iCal日历及xlsx表格文件,进而导入Outlook等日历...
Stars: ✭ 29 (-48.21%)
Mutual labels:  icalendar
Khal
📆 CLI calendar application
Stars: ✭ 1,888 (+3271.43%)
Mutual labels:  icalendar
croncal
Utility to convert a crontab file to a list of actual events within a date range.
Stars: ✭ 37 (-33.93%)
Mutual labels:  icalendar
ADE-Scheduler
A webapp for UCLouvain's ADE scheduling tool.
Stars: ✭ 22 (-60.71%)
Mutual labels:  ical
ChinaPublicCalendar
搜集各种公共事件,包括假日、国际节日、传统节日、节气和电影上映时间等公共日历以 Calendar(RFC5545) 文件格式提供。
Stars: ✭ 58 (+3.57%)
Mutual labels:  ical

PHP iCal Parser

PHP Tests Latest Stable Version Total Downloads License PHP Version Require

Internet Calendaring Parser rfc2445 or iCal parser is simple PHP class for parsing format into array.

"Buy Me A Coffee"

How to install

The recommended way to is via Composer:

composer require om/icalparser

Usage and example

<?php
use om\IcalParser;
require_once '../vendor/autoload.php';

$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('%s - %s' . PHP_EOL, $event['DTSTART']->format('j.n.Y'), $event['SUMMARY']);
	
}

Each property of each event is available using the property name (in capital letters) as a key. There are some special cases:

  • multiple attendees with individual parameters: use ATTENDEES as key to get all attendees in the following scheme:
[
	[
		'ROLE' => 'REQ-PARTICIPANT',
		'PARTSTAT' => 'NEEDS-ACTION',
		'CN' => 'John Doe',
		'VALUE' => 'mailto:[email protected]'
	],
	[
		'ROLE' => 'REQ-PARTICIPANT',
		'PARTSTAT' => 'NEEDS-ACTION',
		'CN' => 'Test Example',
		'VALUE' => 'mailto:[email protected]'
	]
]
  • organizer's name: the CN parameter of the organizer property can be retrieved using the key ORGANIZER-CN

You can run example with PHP Built-in web server as follow:

php -S localhost:8000 -t example

Requirements

  • PHP 8.0+

Run tests

iCal parser using Nette Tester. The tests can be invoked via composer.

composer update
composer test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].