Hello all,
I am trying to tweak my daily notes and I want a section with “Done yesterday”, so far I have this in my template:
# Done yesterday
![[<%*
let lastDay = tp.date.now("YYYY-MM-DD", -1);
const today = tp.date.now("ddd");
if (today === "Mon") {
lastDay = tp.date.now("YYYY-MM-DD", -3);
}
const lastDayTitle = lastDay + "-Daily Log";
const fullFilenameFromLastDay = monthFolder + lastDayTitle;
console.log(fullFilenameFromLastDay);
//fullFilenameFromLastDay^Summary
%>]]
However, I do not achieve to show the content of the “Summary” section from yesterday.
Also, another issue is that right now “yesterday” is just “yesterday” or if it’s Monday then I grab Friday, but ideally I would like to just grab the latest file created under the folder “Daily Tasks”. Is there a way. to do that also?
Thank you in advance and regards