php - ical 文件必须有结束日期吗?

标签 php icalendar

我目前正在用 php 编写一个 .ics 文件。我想知道 VEVENT 是否总是需要有一个结束日期?

比如……这是允许的吗?

BEGIN:VEVENT
UID:d3f760e29fa3f482199f8ed0663d5cf7@mydomain.com
DTSTAMP:20130308T140833Z
DTSTART:20130404T053000Z
DTEND:
SUMMARY:Title of the entry
DESCRIPTION:Something something something …
END:VEVENT

或者这个……

 BEGIN:VEVENT
 UID:d3f760e29fa3f482199f8ed0663d5cf7@mydomain.com
 DTSTAMP:20130308T140833Z
 DTSTART:20130404T053000Z
 SUMMARY:Title of the entry
 DESCRIPTION:Something something something …
 END:VEVENT

感谢您的帮助和提示。

我只是问这个问题,因为有些事件的结束日期是开放的,我不知道何时设置结束日期?

最佳答案

规范中更精确的部分是:3.6.1. Event Component哪个州

For cases where a "VEVENT" calendar component specifies a "DTSTART" property with a DATE value type but no "DTEND" nor "DURATION" property, the event's duration is taken to be one day. For cases where a "VEVENT" calendar component specifies a "DTSTART" property with a DATE-TIME value type but no "DTEND" property, the event ends on the same calendar date and time of day specified by the "DTSTART" property.

在您的情况下,当您希望一个事件从现在开始并且看不到尽头时,规范中没有任何规定。

关于php - ical 文件必须有结束日期吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15295887/

相关文章:

php - 网站到 POS 打印机

asp.net-mvc - DDay iCal - 添加参加者

iphone - 如何使用NSScanner解析.ics文件

java - 在某些情况下使用 google-rfc-2445 (iCalendar) 时会返回开始日期

csv - 将 CSV 文件导入 iCal

javascript - 正在获取 url

php - 将表中的列名称显示为 Pascal 大小写

php - 为什么我每次都收到我已经发送标题的错误消息

PHP : array_intersect not giving expected result

php - MySQL - 两个数据库上的双连接?