Grab frontmatter from (another) note
Yesterday is relative
NOTES/DAILY NOTES/2025/07-Jul/2025-07-30.md
Yesterday is relative, but grabs frontmatter from yesterday
IF_START: IF_START field not found.
Yesterday is relative, but does calculation between notes
IF_START not found for yesterday.IF_END not found for today.
Grabs frontmatter from date_created today (not relative)
May 28, 2024
Calculates non-relative yesterday
2024-05-27
Non-relative yesterday and today
Today: 2024-05-28, Yesterday: 2024-05-27
Best way to grab frontmatter from current note:
dv.current().date_created
This is the final correct code!
Difference in hours between IF_START from yesterday and IF_END from today: 13
Without Metaedit Plugin
Fasting overnight Hours: 13
With Metaedit Plugin
Evaluation Error: TypeError: Cannot read properties of undefined (reading 'api')
at eval (eval at <anonymous> (plugin:dataview), <anonymous>:63:57)
at DataviewInlineApi.eval (plugin:dataview:19027:16)
at evalInContext (plugin:dataview:19028:7)
at asyncEvalInContext (plugin:dataview:19038:32)
at DataviewJSRenderer.render (plugin:dataview:19064:19)
at DataviewJSRenderer.onload (plugin:dataview:18606:14)
at e.load (app://obsidian.md/app.js:1:1214378)
at DataviewApi.executeJs (plugin:dataview:19607:18)
at DataviewCompiler.eval (plugin:digitalgarden:10763:23)
at Generator.next (<anonymous>)
REFERENCE:
https://chatgpt.com/share/38311efa-b7d5-4844-826c-f2193e555f0b