Reference Date for Future Date Data

I use templates to create my meeting notes. In some cases, I may create a meeting note for something that’s not happening until a later date. Is there a way to get specific date “data” using a reference date? For example: If I have a meeting two weeks from now, I have a template trigger that asks me for the meeting date. I put in the future date of the upcoming meeting. I want to use that date as a reference to get the weekday, week number, etc from that date to plug into other metadata that I use for searching and sorting notes.

I then have a weekly review note that lists my meetings for the upcoming week with the day of the week and time of the meeting using Dataview. I’m trying to find a way to automate that input into the template when I create the meeting file.

I have no experience with javascript, so I was hoping to use something that was part of an exiting plugin.

I’ve looked through both the dataview and Templater documentation and can’t seem to find anything relating to future date references. Only adding days to the current date.

The Natural Language Dates plugin might do what you want.

I’m slightly confused as to your use case, but using a standard inline DQL query you could do stuff like the following:

[myDate:: 2023-11-10]

Plus 2 weeks: `= this.myDate + dur("2 weeks") `

If you’re within either a template you might want to check out the documentation on tp.date, where various examples are shown shifting the date using offsets. Especially in the moment.js section it also shows how to manipulate existing days using offset, before formatting according to your needs.

If you’re within dataviewjs, variants of the same moment() stuff can be used for date handling, but be forewarned it can be icky, very icky to work with dates within the confusing worlds of dataview (as in DQL queries) and in javascript (as in moment.js stuff).