Advertisement
dhniceday

Untitled

Jan 12th, 2023
98
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.  
  10. //- test startTime13:30 endTime13:40
  11. //var eventsString = await events.reduce((text, event) => text +=- ${event.summary} startTime${moment(event.start.dateTime).format("HH:mm")} endTime${moment(event.end.dateTime).format("HH:mm")}\n, "");
  12. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement