PHPackages                             zenapply/calendar-links - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zenapply/calendar-links

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zenapply/calendar-links
=======================

Generate add to calendar links for Google, iCal and other calendar systems

2.1.1(7y ago)0385MITPHPPHP ^5.5

Since Sep 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zenapply/calendar-links)[ Packagist](https://packagist.org/packages/zenapply/calendar-links)[ Docs](https://github.com/zenapply/calendar-links)[ RSS](/packages/zenapply-calendar-links/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (21)Used By (0)

Generate add to calendar links for Google, iCal and other calendar systems
==========================================================================

[](#generate-add-to-calendar-links-for-google-ical-and-other-calendar-systems)

[![Latest Version on Packagist](https://camo.githubusercontent.com/42dd15f9322402e2b426cf108738f89317877232c85d1ab46fd9b69bb910aeda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656e6170706c792f63616c656e6461722d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zenapply/calendar-links)[![Build Status](https://camo.githubusercontent.com/91d677ccc5c1c70cbe89efa86eaa971959a4b35e77fdce0b3bb27b7052b4cb81/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a656e6170706c792f63616c656e6461722d6c696e6b732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/zenapply/calendar-links)[![Quality Score](https://camo.githubusercontent.com/529c948e24949f678764b9699a174000521cb9964358526924cd53aa5a54a063/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7a656e6170706c792f63616c656e6461722d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/zenapply/calendar-links)[![StyleCI](https://camo.githubusercontent.com/5446c998c6e5c6247217d03f52cd97d298d394b25a2922501d66ce5e01c9a2f1/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130333633383038302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/103638080)[![Total Downloads](https://camo.githubusercontent.com/9aba24ccc4765f680594cfd59924692f7f475c8ff971e04f285a9805a529a9dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a656e6170706c792f63616c656e6461722d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zenapply/calendar-links)

This was forked from [spatie/calendar-links](https://github.com/spatie/calendar-links) to support php &gt;=5.5.9
----------------------------------------------------------------------------------------------------------------

[](#this-was-forked-from-spatiecalendar-links-to-support-php-559)

Using this package you can generate links to add events to calendar systems. Here's a quick example:

```
(new Link(
   'Birthday',
   DateTime::createFromFormat('Y-m-d H:i', '2018-02-01 09:00'),
   DateTime::createFromFormat('Y-m-d H:i', '2018-02-01 18:00')
))->google();
```

This will output: `https://calendar.google.com/calendar/render?action=TEMPLATE&text=Birthday&dates=20180201T090000/20180201T180000&sprop=&sprop=name:`

If you follow that link (and are authenticated with Google) you'll see a screen to add the event to your calendar.

The package can also generate ics files that you can open in several email and calendar programs, including Microsoft Outlook, Google Calendar, and Apple Calendar.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require zenapply/calendar-links
```

Usage
-----

[](#usage)

```
