Posted by saeedesmaili 12 hours ago
We use a WhatsApp channel for our family to manage breakfast meetups and who needs what from the shops or the pharmacy (they are on our healthcare plan) and general conversation about events or troubles and parental advice in their lives.
One kid live on her own with her bf a few minutes from us but she can't drive so we sometimes have to pick her up from work.
It gets muddled but works for us as the rule is no pet photos unless it is very cute (cat with a dustbin cover on his head) or inspirational daily quotes.
Where I got stuck is calendars... Unfortunately Google Calendar doesn't seem to provide a nice API where you can just say "give me the events for these days", instead you can only download all of your events in iCal format. It's then extremely non-trivial to convert that information into "what is happening today".
Something like:
```
function doGet(req) {
let start = new Date();
start.setHours(12,0,0,0);
let end = new Date(start);
end.setDate(end.getDate() + 3);
let events = CalendarApp.getEvents(start, end);
return ContentService.createTextOutput(events.map(x => x.getTitle()));
}```