makunuk / icalendar
iCalendar 是一种计算机文件格式,允许互联网用户向其他互联网用户发送会议请求和任务
v2.1.0
2022-08-02 14:20 UTC
Requires
- php: >=7.4
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-26 12:14:30 UTC
README
iCalendar 是一种计算机文件格式,允许互联网用户向其他互联网用户发送会议请求和任务
本项目遵循 RFC 5545
Composer
composer require makinuk/icalendar>=1.0
示例用法
require_once "../vendor/autoload.php"; $ical = new makinuk\ICalendar\ICalendar(); $event = new makinuk\ICalendar\ICalEvent(); $event->setUId("11223344") ->setStartDate(strtotime("+24 hours")) ->setEndDate(strtotime("+25 hours")) ->setSummary("Summary is here") ->setDescription("Description area is here") ->setLocation("Istanbul") ->setOrganizer(new makinuk\ICalendar\ICalPerson("Mustafa AKIN", "user@domain.com")) ->setAlarm(new makinuk\ICalendar\ICalAlarm(0, 1, 10, 0)); $ical->addEvent($event); //$ical->getCalendarText(); //$ical->show(); $ical->saveToFile(dirname(__FILE__).DIRECTORY_SEPARATOR."simpleEventAdd.ics");