Compatible with randomBrainstormer MMM GoogleCalendar - MMRIZE/MMM-CalendarExt3 GitHub Wiki
preProcessor: (e) => {
if (e.startDate) return e // when event coming from default module, skip conversion.
if (e.start?.dateTime) {
e.startDate = new Date(e.start.dateTime).valueOf()
} else if (e.start?.date) {
e.startDate = new Date(`${e.start.date}T00:00:00`).valueOf()
}
if (e.end?.dateTime) {
e.endDate = new Date(e.end.dateTime).valueOf()
} else if (e.end?.date) {
e.endDate = new Date(`${e.end.date}T00:00:00`).valueOf()
}
e.title = e.summary
e.fullDayEvent = (e.start?.date) ? true : false
return e
}
This tip doesn't consider different time zones. You should add some offset to
startDateandendDateadditionally to convert the event into your timezone if the calendar's timezone differs from your system.