Advertisement
dhniceday

Untitled

Jan 12th, 2023
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%*
  2. const {getEvents} = this.app.plugins.plugins["google-calendar"].api;
  3.  
  4. const file = await tp.file.title;
  5. const events = await getEvents({ startDate: window.moment(file) });
  6.  
  7. var eventsString = await events.reduce((text, event) => text +=- [ ] ${moment(event.start.dateTime).format("HH:mm")} ${event.summary} \n, "");
  8. eventsString = eventsString.replace(/|/g, '-');
  9. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement