v0.8.4
-
Add support for time-less dates
When a property that transforms
Date
values is set withVALUE=DATE
, the time is not included when generating the ICS data.Example:
const event = new ICS.VEVENT(); // VALUE=DATE event.addProp('DTSTAMP', new Date('1991-07-11'), { VALUE: 'DATE' }); // VALUE=DATE-TIME event.addProp('DTSTART', new Date('1991-07-11 10:00:00'), { VALUE: 'DATE-TIME' }); // Without props (DATE-TIME is the default) event.addProp('DTEND', new Date('1991-07-11 22:00:00')); // Non-Date values are passed without transformations event.addProp('RDATE', '19910711T190000');
Return value of
event.toString()
:VBEGIN:VEVENT DTSTAMP:19910711 DTSTART:19910711T100000 DTEND:19910711T220000 RDATE:19910711T190000 VEND:VEVENT