On Wed, 7 Sep 2016, at 10:31 AM, Tom Smith wrote: > The recent changes to CalendarEvent no longer include the ability to > return the end date of an event. What does this mean when parsing > DTSTART/DURATION and DTEND from iCalendar?
It means that you calculate the duration from the DTSTART/DTEND and use this in the event (just as before you would have had to work out the DTEND if the iCalendar version had a DURATION). > This means the client will ultimately need to calculate it's own end > date again. Whereas before the client would have had to calculate the duration. Either way the client will have to do a bit of date maths, but it's not hugely difficult. > When saving a modified event, should the JMAP server save only > DTSTART and DURATION? An iCalendar version may be saved with either DURATION or DTEND. > Also, if we have DTSTART/DTEND and DURATION, do we ignore DURATION and > calculate, or use DURATION? As per the definition of the VEVENT component[1], either 'dtend' or 'duration' MAY appear in a 'eventprop', but 'dtend' and 'duration' MUST NOT occur in the same 'eventprop'. So the result is undefined in iCalendar, therefore there is no correct answer here. Either option seems reasonable. Neil. Links: 1. https://tools.ietf.org/html/rfc5545#section-3.6.1 -- You received this message because you are subscribed to the Google Groups "JMAP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/1473429340.3592706.720727089.3719309C%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
