简体   繁体   English

如果有时间限制,根据RFC5545和Fullcalendar的排他性/包含性DTEND,如何正确处理?

[英]Exclusive/Inclusive DTEND according to RFC5545 and Fullcalendar in event with time part, how to do it right?

According to rfc5545 : 根据rfc5545

The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event. “ VEVENT”日历组件的“ DTEND”属性指定事件的非包含结尾。

Also in fullcalendar documentation for end property of event object written the same: 同样在全日历文档中,事件对象的end属性也写成相同的:

The exclusive date/time an event ends. 事件结束的专有日期/时间。 Optional. 可选的。

A Moment-ish input, like an ISO8601 string. 瞬间输入,例如ISO8601字符串。 Throughout the API this will become a real Moment object. 在整个API中,这将成为真正的Moment对象。

It is the moment immediately after the event has ended. 这是活动结束后的瞬间。 For example, if the last full day of an event is Thursday, the exclusive end of the event will be 00:00:00 on Friday! 例如,如果活动的最后一整天是星期四,则活动的独家结束时间将是星期五的00:00:00!

With allday event everything is clear, if event from 24/03/2016 to 25/03/2016 I need to write according to described above from 24/03/2016 to 25/03/2016. 对于全天活动,如果从24/03/2016到25/03/2016的事件发生的话,一切都将是清楚的,我需要根据上述说明从24/03/2016到25/03/2016进行写作。

Now, my question is how I supposed to write in DTEND when event from 24/03/2016 10:00 to 24/03/2016 10:30 , ie 30 min event? 现在,我的问题是当事件从24/03/2016 10:0024/03/2016 10:30 (即30分钟事件) 24/03/2016 10:30 ,我应该如何用DTEND编写? Do I need to write 24/03/2016 10:30:01 to create non-inclusive end date? 我需要写24/03/2016 10:30:01来创建非包含结束日期吗?

Your understanding of the RFC5545 is correct, it is your math which is failing you: 您对RFC5545的理解是正确的,是您的数学失败了:

Say you want to have a 1 min event you would have 假设您想参加1分钟的活动

DTSTART:20160324T173000Z DTSTART:20160324T173000Z
DTEND:20160324T173100Z DTEND:20160324T173100Z

Similarly for a 30 min event you would have: 同样,对于30分钟的活动,您将有:

DTSTART:20160324T173000Z DTSTART:20160324T173000Z
DTEND:20160324T180000Z DTEND:20160324T180000Z

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM