test:get date based calendar test to run
This commit is contained in:
parent
0114c94caa
commit
d08d87f47c
|
@ -29,8 +29,8 @@ export async function fetchCalendarData(calendar) {
|
||||||
// Create a top-level VCALENDAR component
|
// Create a top-level VCALENDAR component
|
||||||
export function createCalendarComponent(name) {
|
export function createCalendarComponent(name) {
|
||||||
const calendarComponent = new ICAL.Component(['vcalendar', [], []]);
|
const calendarComponent = new ICAL.Component(['vcalendar', [], []]);
|
||||||
calendarComponent.updatePropertyWithValue('version', '2.0');
|
|
||||||
calendarComponent.updatePropertyWithValue('name', name);
|
calendarComponent.updatePropertyWithValue('name', name);
|
||||||
|
calendarComponent.updatePropertyWithValue('version', '2.0');
|
||||||
return calendarComponent;
|
return calendarComponent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,11 +73,11 @@ export function addEventsToCalendar(calendarComponent, results) {
|
||||||
} else {
|
} else {
|
||||||
console.warn('DTSTAMP not found in the original event.'); // Warn if DTSTAMP is missing
|
console.warn('DTSTAMP not found in the original event.'); // Warn if DTSTAMP is missing
|
||||||
}
|
}
|
||||||
newEvent.updatePropertyWithValue('summary', vevent.summary.trim()); // Set SUMMARY without leading spaces
|
|
||||||
|
|
||||||
// Set the dtstart and dtend properties using ICAL.Time
|
// Set the dtstart and dtend properties using ICAL.Time
|
||||||
newEvent.updatePropertyWithValue('dtstart', startTime);
|
newEvent.updatePropertyWithValue('dtstart', startTime);
|
||||||
newEvent.updatePropertyWithValue('dtend', endTime);
|
newEvent.updatePropertyWithValue('dtend', endTime);
|
||||||
|
newEvent.updatePropertyWithValue('summary', vevent.summary.trim());
|
||||||
|
|
||||||
|
|
||||||
// Add the new event to the calendar component
|
// Add the new event to the calendar component
|
||||||
|
|
|
@ -8,4 +8,4 @@ DTSTART;VALUE=DATE:20231225
|
||||||
DTEND;VALUE=DATE:20231226
|
DTEND;VALUE=DATE:20231226
|
||||||
SUMMARY:Christmas Day
|
SUMMARY:Christmas Day
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
END:VCALENDAR
|
END:VCALENDAR
|
Loading…
Reference in New Issue