Exclusive/Inclusive DTEND according to RFC5545 and

2019-09-19 05:15发布

According to rfc5545:

The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event.

Also in fullcalendar documentation for end property of event object written the same:

The exclusive date/time an event ends. Optional.

A Moment-ish input, like an ISO8601 string. Throughout the API this will become a real Moment object.

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!

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.

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, i.e. 30 min event? Do I need to write 24/03/2016 10:30:01 to create non-inclusive end date?

1条回答
我命由我不由天
2楼-- · 2019-09-19 05:43

Your understanding of the RFC5545 is correct, it is your math which is failing you:

Say you want to have a 1 min event you would have

DTSTART:20160324T173000Z
DTEND:20160324T173100Z

Similarly for a 30 min event you would have:

DTSTART:20160324T173000Z
DTEND:20160324T180000Z

查看更多
登录 后发表回答