Things I have tried
Dozens of different dataview codes.
What I’m trying to do
In the template for my daily notes, I have the following dataview code:
list from #journal
where contains(file.name, "{{date:YYYY-MM}}")
sort file.name asc
When the new daily note is created, it produces the following, with the date field having the correct year and month:
list from #journal
where contains(file.name, "2021-08")
sort file.name asc
This means I get a linked list at the end of every daily note of all the notes written in the current month. This helps with navigation.
I add a second a set of code to also list the previous month, but I have to add this manually. The following, for example, lists all the daily notes for July 2021:
list from #journal
where contains(file.name, "2021-07")
sort file.name asc
What I would like to do is to find a way to automate this so that the…
where contains(file.name, "{{date:YYYY-MM}}")
…in the template generates a date based on the previous month. I was hoping something simple like the following would work:
where contains(file.name, "{{date:YYYY-MM}}, -1")
But, of course, it doesn’t.
Anyone know if it is possible to make this work?
Thanks for reading.
Angel