support time based events

This commit is contained in:
Ryan Mwangi 2024-10-22 19:22:57 +03:00
parent c570cd9054
commit 1bb8eda0ec
1 changed files with 4 additions and 4 deletions

View File

@ -87,8 +87,8 @@ METHOD:PUBLISH
`; `;
mergedCal.forEach((event) => { mergedCal.forEach((event) => {
icalString += `BEGIN:VEVENT icalString += `BEGIN:VEVENT
DTSTART;VALUE=DATE:${event.start.toISOString().split('T')[0].replace(/-/g, '')} DTSTART;VALUE=DATETIME:${event.start.toISOString().replace(/-|:|\.\d{3}/g, '')}
DTEND;VALUE=DATE:${ event.end.toISOString().split('T')[0].replace(/-/g, '')} DTEND;VALUE=DATETIME:${event.end.toISOString().replace(/-|:|\.\d{3}/g, '')}
SUMMARY:${event.summary} SUMMARY:${event.summary}
END:VEVENT END:VEVENT
`; `;
@ -208,8 +208,8 @@ METHOD:PUBLISH
`; `;
mergedCal.forEach((event) => { mergedCal.forEach((event) => {
icalString += `BEGIN:VEVENT icalString += `BEGIN:VEVENT
DTSTART;VALUE=DATE:${event.start.toISOString().split('T')[0].replace(/-/g, '')} DTSTART;VALUE=DATETIME:${event.start.toISOString().replace(/-|:|\.\d{3}/g, '')}
DTEND;VALUE=DATE:${event.end.toISOString().split('T')[0].replace(/-/g, '')} DTEND;VALUE=DATETIME:${event.end.toISOString().replace(/-|:|\.\d{3}/g, '')}
SUMMARY:${event.summary} SUMMARY:${event.summary}
END:VEVENT END:VEVENT
`; `;