PHPackages                             jiejunf/calendar - 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. jiejunf/calendar

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

jiejunf/calendar
================

Tool for generate calendar ics file

v1.0(4y ago)071PHPPHP &gt;=8

Since Apr 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jiejunf/calendar)[ Packagist](https://packagist.org/packages/jiejunf/calendar)[ RSS](/packages/jiejunf-calendar/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Install
-------

[](#install)

```
composer require jiejunf/calendar
```

Example
-------

[](#example)

```
        $calendar = new Calendar();
        $calendar->name('吉诺儿 Kino 直播日历');
        $calendar->color(sprintf('#%x%x%x', 225, 179, 224));
        $calendar->setTimezone('Asia/Shanghai')->parseStandard();
        $calendar->setEvent('[3D]mini party', '20220401190000', '202204012130')
                 ->uid(md5('20220401190000'))
                 ->description('[3D]mini party')
                 ->url('https://live.bilibili.com/23221095')
                 ->location('https://live.bilibili.com/23221095')
                 ->tap(fn(Event $event) => $event->setAlarm())
                 ->tap(fn(Event $event) => $event->setAlarm(10))
                 ->tap(fn(Event $event) => $event->setAlarm(15));
        // strtotime
        date_default_timezone_set('Asia/Shanghai');
        $calendar->setEvent('[2D]有一个直播', '+1 minutes', '+5 minutes')
                 ->uid(md5('+1 minutes'))
                 ->setAlarm()
                 ->action('AUDIO')
                 ->description('??:??')
                 ->attach(Property::attach('https://aliyun-01.emmmmm.top/dingdong.mp3', 'audio/mpeg'));
        $calendar->setEvent('[3D]舞蹈100连', new \DateTime('202204081800'), new \DateTime('202204082000'))
                 ->uid(md5('舞蹈 100 连'))
                 ->description(
