-
I have a template ---
type: event
location: "{{gEvent.location}}"
date_all_day: "{{gEvent.start.date}}"
date_start: "{{gEvent.start.dateTime}}"
date_end: "{{gEvent.end.dateTime}}"
MOCs:
- "[[Events MOC]]"
- "[[<% tp.date.now('YYYY-MM-DD-dddd') %>]]"
summary:
---
<% await tp.file.move("/Extras/Events/" + tp.date.now("YYYY-MM-DD") + " " + tp.file.title) %>
# [[<% tp.date.now("YYYY-MM-DD") + " " + tp.file.title %>]]
{{gEvent.description}}
### Attendees
- [ ]
### Notes
- Adding the following description to an event in my Google calendar, I specify creation folder and template.
Uses my template and creates the following note with the tile event-id: 123456789
type: event
location: "Tasty Ramen Place"
date_all_day: ""
date_start: "2023-09-24T13:30:00+02:00"
date_end: "2023-09-24T14:30:00+02:00"
MOCs:
- "[[Events MOC]]"
- "[[2023-09-24-Sunday]]"
summary:
---
# [[2023-09-24 Tasty Ramen]]
Meeting my friends [[Friend A]] and [[Friend B]] for a tasty ramen
:Extras/Events-obsidian-GCal-event-template:
### Attendees
- [[]]
### Notes
- I would like to just improve one thing.
Is there an easy way for me to do that? And are there any other things which are missing in my template? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Beta Was this translation helpful? Give feedback.
-
Thank you for your help!
which produces this
I think this is now a very basic template which can be used for all kinds of different events and meetings. Would you like me to open a Merge Request and add it to the README? Or to a different folder containing possible templates? Also, I would like to add information about what kind of variables you can use in the |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
So that is what the mysterious code is doing! I will re-add your implementation to enable All-Day-Events too! I will try to integrate my MR it nicely into the |
Beta Was this translation helpful? Give feedback.
Hi, because you use templater you can use
window.moment
to format the dates.Here is an example that should achive the required things.