Natural Language Date Processing

From reading a lot of the plugin and feature requests, daily notes are a big thing with the Obsidian crowd. I know I’m a fan. What would be even sweeter is the ability to create links to daily notes using NLP. Linking to [[Yesterday]] would automatically change to daily note previous to the Creation Date of the current note. Linking to [[Tomorrow]] do the opposite. Future date math is cool because, whatever you just linked will be sitting in the Backlinks of your daily note when you finally get to that day.

Those two are easy, adding [[Next Monday]] or [[Two Weeks From Friday]] would be next level.

Yes, I can do this manually, but I personally don’t like to do date math when I’m just trying to remember ping my boss next week about that raise we discussed “the other day”.

12 Likes

+1

In Obsidian’s competitor this was done by an external plugin using this: https://github.com/wanasit/chrono

Here’s the link using the Plugin API right out of the oven: https://github.com/argenos/nldates-obsidian

5 Likes

This is really great. I will definitively use it as soon as Obsidian 0.9.7 is out.

One thing I was thinking about: could this be brought even further? Could it be possible to apply this same logic to filters?

Let me explain better. I know this maybe sounds a bit strange but what I usually do is create daily notes (for journaling) exactly in the way the plugin does (i.e. [[2020-10-31]]). But sometimes I would like to be able to treat these notes as real events with a “date attribute” in order to filter them in the search tab: “BETWEEN:2020-10-01,2020-10-31” finds all the daily notes written in October.

Another thing that I would like to to is to tag a date interval inside a note. For example I could go on vacation for two weeks and I would like to link the [[Vacation 2020]] back to those 15 days. Of course I could do manually linking all 15 days one by one but that kind of misses the point of my question :slight_smile:

What do you think?

I’ve thought a little about the first use case, see

About the second one, can you give an example of what tagging would look like for you? Do you want to expand the dates in the file “Vacation 2020”?