Hi Rasmus,
I use Inline Dataview Fields instead of YAML because of this post here. But you may find my stuff useful.
weekly review note
Time Information
- #📓/7️⃣
- **Days**:: [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-[W]ww") %>]], [[<% tp.date.now("YYYY-MM-DD", +0, tp.file.title, "YYYY-[W]ww") %>]], [[<% tp.date.now("YYYY-MM-DD", +1, tp.file.title, "YYYY-[W]ww") %>]], [[<% tp.date.now("YYYY-MM-DD", +2, tp.file.title, "YYYY-[W]ww") %>]], [[<% tp.date.now("YYYY-MM-DD", +3, tp.file.title, "YYYY-[W]ww") %>]], [[<% tp.date.now("YYYY-MM-DD", +4, tp.file.title, "YYYY-[W]ww") %>]], [[<% tp.date.now("YYYY-MM-DD", +5, tp.file.title, "YYYY-[W]ww") %>]]
%% Create note on Sunday - days of the week include from Sunday last week to Saturday%%
- **Month**:: [[<%tp.date.now("YYYY-MM", +0, tp.file.title, "YYYY-[W]ww")%>]]
- **Quarter**:: [[<% tp.date.now("YYYY-[Q]Q", +0, tp.file.title, "YYYY-[W]ww") %>]]
- **Year**:: [[<% tp.date.now("YYYY", +0, tp.file.title, "YYYY-[W]ww") %>]]
Example Sleep Tracker
##### Sleep and Energy Tracking
- *Weekly Sleep Average calculation*: `=round(sum(this.days.sleep-duration)/7, 4)`
- *Round the decimal*: `=round(0.<%tp.file.cursor(1)%>*60)` minutes
- **Sleep Duration**::
```dataview
table WITHOUT ID
file.link as Date____,
join(list(sleep-hour, sleep-minute), ":") as "Sleep Time",
join(list(awake-hour, awake-minute), ":") as "Awake Time",
sleep-duration as "Sleep Duration",
choice(physical-activity, "✅", "❌") as "Physical Activity"
FROM #📓
WHERE week = this.file.link
sort file.name asc
```
Example Habit Tracking - using inline Dataview
- **Morning Gratitude**::
- *This Week's Morning Gratitude*: `=this.days.morning-gratitude`
- **Desired Outcome**::
- *This Week's Desired Outcome*: `=this.days.desired-outcome`
```