Skip to content

Commit

Permalink
fix: use valid values for dtStart and dtEnd (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainmetayer committed May 9, 2023
1 parent bb48547 commit 6e3be35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/generateIcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ for (const event of allEvents) {
let vevent = new VEVENT();
vevent.addProp('UID', `${event.name}@dca-${eventYear}`);
vevent.addProp('DTSTAMP', new Date());
vevent.addProp('DTSTART', new Date(event.date[0] * 1000));
vevent.addProp('DTEND', new Date(event.date[1] * 1000));
vevent.addProp('DTSTART', new Date(event.date[0]));
if(event.date[1]) {
vevent.addProp('DTEND', new Date(event.date[1]));
}
vevent.addProp('LOCATION', event.location || 'unspecified');
vevent.addProp('SUMMARY', event.name);
vevent.addProp('URL', event.hyperlink || 'unspecified');
Expand Down

0 comments on commit 6e3be35

Please sign in to comment.