Closed aheintz closed 7 years ago
Please note that per rfc 5545 DURATION
and DTEND
are actually exclusive. You can specify either one, but not both because data could be represented ambiguously.
I'm aware of they being mutually exclusive, however I'm trying to use ical.js to manipulate events where the backend system consistently uses DTSTART
and DURATION
and I would like to maintain that standard.
I'm trying all possible ways to set the duration of an Event without success. The existing duration isn't update when the end- or starttime is changed.
Sample code (insignificant properties and code omitted, vcalendar created using .toString()):
Altering the Event using (start and end variables is Moment.js objects):
DTSTART
andDTEND
is correctly updated, but not DURATION. And there is no duration setter either.By adding a duration setter, it works as I think it should, but 1) I'm no calender guru, and 2) definitively not a javascript one so I'm not capable of creating a pull request with any tests but here's the code for the setter. However, not being able to set the duration might be a feature, but the duration not being updated is in my opinion a bug.