All Projects → markuspoerschke → Ical

markuspoerschke / Ical

Licence: mit
iCal-creator for PHP

Projects that are alternatives of or similar to Ical

every2cal
🙌에브리타임 캘린더를 ics파일로 바꿔줍니다
Stars: ✭ 33 (-96.3%)
Mutual labels:  calendar, ics
Daylight-Calendar-ICS
Daylight Calendar is a dynamically generated .ics calendar that you can host and subscribe to in Google Calendar, iCal, or other calendar software.
Stars: ✭ 22 (-97.53%)
Mutual labels:  calendar, ics
ical
📅 Golang iCalendar lexer/parser implementing RFC 5545
Stars: ✭ 28 (-96.86%)
Mutual labels:  calendar, ics
Mxlcalendarmanager
A set of classes used to parse and handle iCalendar (.ICS) files
Stars: ✭ 198 (-77.78%)
Mutual labels:  ics, calendar
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 (-96.86%)
Mutual labels:  calendar, ics
prodcal ics
Производственный календарь в формате ics
Stars: ✭ 23 (-97.42%)
Mutual labels:  calendar, ics
datebook
📅 Generates URLs and downloadable ICS files for adding events to popular calendar apps.
Stars: ✭ 273 (-69.36%)
Mutual labels:  calendar, ics
Ics Py
Pythonic and easy iCalendar library (rfc5545)
Stars: ✭ 322 (-63.86%)
Mutual labels:  ics, calendar
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 (-87.32%)
Mutual labels:  calendar, ics
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 (-98.2%)
Mutual labels:  calendar, ics
Ics
iCalendar (ics) file generator for node.js
Stars: ✭ 324 (-63.64%)
Mutual labels:  ics, calendar
Fb2cal
Fetch Facebook Birthdays events and create an ICS file for use with calendar apps
Stars: ✭ 335 (-62.4%)
Mutual labels:  ics, calendar
React Date Picker
A date picker for your React app.
Stars: ✭ 715 (-19.75%)
Mutual labels:  calendar
Angular Bootstrap Calendar
A port of the bootstrap calendar widget to AngularJS (no jQuery required!)
Stars: ✭ 803 (-9.88%)
Mutual labels:  calendar
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (-20.65%)
Mutual labels:  calendar
Leantime
Leantime is a lean project management system for innovators. Designed to help you manage your projects from ideation to delivery.
Stars: ✭ 702 (-21.21%)
Mutual labels:  calendar
Vue Calendar
🏆 基于 vue 2.0 开发的轻量,高性能日历组件
Stars: ✭ 828 (-7.07%)
Mutual labels:  calendar
Laravel Google Calendar
Manage events on a Google Calendar
Stars: ✭ 787 (-11.67%)
Mutual labels:  calendar
Oncall
Oncall is a calendar tool designed for scheduling and managing on-call shifts. It can be used as source of dynamic ownership info for paging systems like http://iris.claims.
Stars: ✭ 702 (-21.21%)
Mutual labels:  calendar
Composer
Dependency Manager for PHP
Stars: ✭ 25,994 (+2817.4%)
Mutual labels:  composer

📅 eluceo — iCal 2

Build Status reviewdog codecov Psalm coverage License Latest Stable Version Monthly Downloads Infection MSI

This package offers an abstraction layer for creating iCalendars files. By using this PHP package, you can create *.ics files without the knowledge of the underling format. The output itself will follow RFC 5545 as good as possible.

Installation

You can install this package by using Composer, running the following command:

composer require eluceo/ical

Version / Upgrade

The initial version was released back in 2012. The version 2 of this package is a complete rewrite of the package and is not compatible to older version. Please see the upgrade guide if you want to migrate from version 0.* to 2.*. If you just start using this package, you should install version 2.

Version PHP Version
0.11.* 5.3.0 - 7.4
0.15.* 7.0 - 7.4
2.* 7.4 only

Documentation

Visit ical.poerschke.nrw for complete documentation.

Usage

The classes within this package are grouped into two namespaces:

  • The Domain contains the information about the events.
  • The Presentation contains the transformation from Domain into a *.ics file.

To create a calendar, the first step will be to create the corresponding domain objects. Then these objects can be transformed into a iCalendar PHP representation, which can be cast to string.

Empty event

In this very basic example, that renders an empty event. You will learn how to create an event domain object, how to add it to a calendar and how to transform it to a iCalendar component.

1. Create an event domain entity

$event = new \Eluceo\iCal\Domain\Entity\Event();

2. Create a calendar domain entity

$calendar = new \Eluceo\iCal\Domain\Entity\Calendar([$event]);

3. Transform calendar domain object into a presentation object

$iCalendarComponent = (new \Eluceo\iCal\Presentation\Factory\CalendarFactory())->createCalendar($calendar);

4. a) Save to file

file_put_contents('calendar.ics', (string) $iCalendarComponent);

4. b) Send via HTTP

header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="cal.ics"');

echo $iCalendarComponent;

Full example

The following example will create a single day event with a summary and a description. More examples can be found in the examples/ folder.

<?php

require_once __DIR__ . '/../vendor/autoload.php';

// 1. Create Event domain entity
$event = (new Eluceo\iCal\Domain\Entity\Event())
    ->setSummary('Christmas Eve')
    ->setDescription('Lorem Ipsum Dolor...')
    ->setOccurrence(
        new Eluceo\iCal\Domain\ValueObject\SingleDay(
            new Eluceo\iCal\Domain\ValueObject\Date(
                \DateTimeImmutable::createFromFormat('Y-m-d', '2030-12-24')
            )
        )
    );

// 2. Create Calendar domain entity
$calendar = new Eluceo\iCal\Domain\Entity\Calendar([$event]);

// 3. Transform domain entity into an iCalendar component
$componentFactory = new Eluceo\iCal\Presentation\Factory\CalendarFactory();
$calendarComponent = $componentFactory->createCalendar($calendar);

// 4. Set headers
header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="cal.ics"');

// 5. Output
echo $calendarComponent;

License

This package is released under the MIT license.

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].