Filtering base fore recent notes

I think what Arienhen meant by having a created and/or modified key in YAML/Properties is that by doing so, it “freezes” the modified/created date/time to a point in time you choose independently from your system (which, depending on the (use) case, can be much more reliable than relying on mtime & ctime as syncing can interfere with these date/time values) :blush:

So instead of comparing a date to mtime and/or ctime you would compare the date to a modified and/or created key stored in YAML/Properties and get static but probably more reliable results (avoiding strange results which would just be listed because you synced your files across devices while no modifications where actually made to them)

But that requires a bit of maintenance (as opposed to mtime & ctime which are automatically saved by your OS) as you either need to update the value of the key manually or use a plugin or another to do so :blush:

1 Like

Good point about the timestamp not being frozen/static. This means that, if I look at a Daily Note from a few weeks or months ago it will no longer show all the files modified on that day, but rather only the ones that have not been modified since then. So, the label for the column ought to be “Last Modified on this day” or something similar.

Another way to create a static snapshot that freezes in time what you worked on that day requires a manual step, as part of a “shutdown routine”: You can use the “Copy to clipboard” function for a specific view (see the screenshot), and then paste that as a static table into the note. I’ve now created a separate view for the .base file embedded in my daily note, which allows me to quickly generate a table of all the files modified on that day. It’s an extra step, but perhaps a good one, as part of a journaling routine.

Note that one limitation of Bases, at this point, is that when you use “Copy to clipboard” you get flat text as the titles of notes, so they are not linked. I’d like the option to paste as a link – as I’ve requested elsewhere – but for the “snapshot” function, I like the fact that I don’t get too much clutter-linkage. If every daily note included dozens of links, the graph view would become virtually unusable after a few months, not to mention years. But for others, this might be crucial. (Or, you can selectively wiki-wrap a few key notes manually. Again, extra effort, but perhaps a useful form of curation.)

I have so many YAML entries missing for Created and Modified. Use the formula hack to get around it but it’s not perfect. Now I have bases I can invest time in filling in the gaps :wink:

In case anyone comes here after 1.9.2, there is a new syntax

  • New: file.mtime >= today() - "7d"
  • Old: date(file.mtime) >= date(dateModify(date(now), "-7d"))
3 Likes