0

I ask myself if there is a possible way to create subevents in the iCalendar file format. For example, if an event has duration of 12:00 to 14:00 I would like to divide it into 12:00 to 13:00 and 13:00 to 14:00 as subevents.

NOTE: Apple's iCal uses the kind of subevent I would like to use with "travel time". It adds a kinda subevent before the actual event.

Is there a way to do it?

4

1 回答 1

2

如果您查看iCalendar 组件列表,则仅列出事件而没有子事件,类似地,事件只能具有一定数量的属性,并且没有子事件。iCaleandar 规范中的一项规定是关于组件之间的关系,您可以使用这些关系将一个定义VEVENTCHILD另一个,但这不是您所要求的。

如果您打开由 icalendar 使用旅行时间创建的实际事件,您将看到只VEVENT创建了一个,并且 Apple 创建了一个新的非标准属性:X-APPLE-TRAVEL-DURATION并且该事件DTSTART实际上设置为您的事件开始DATE-TIME减去您的旅行时间。

因此,回答您的问题的底线是,不可能创建子事件,但存在多种方法可以实现与您提到的 iCalendar 功能类似的结果:创建多个VEVENT(一个用于旅行,一个用于实际事件),创建一个事件在仅具有标准属性的总持续时间(事件+旅行)中,创建一个VEVENT具有 Apple 非标准属性 ( X-APPLE-TRAVEL-DURATION)

于 2014-02-03T04:58:39.203 回答