DataviewJs: Calculation with headings

Hi everybody,

I have two files. One file contains in h2 various meeting dates such as:

## 1. Meeting on 14.01.23

## 2. Meeting on 15.03.23

## 3. Meeting on 15.04.23

The second file is a dashboard note in which I would like to use JavaScript to output the date of the next meeting, such as

Upcoming meeting on: $What goes in here?

Do you have any idea how this is possible?

Any help is appreciated.


You tell us, when is the next meeting? Or are you expecting us to read your mind on what determines when the next meeting is? :slight_smile:

As far as dataviewjs regards, those are not considered dates, but that could be fixed with some regex magic I reckon.

However, you give us dates in January, March, and April, which leaves it to be anyone’s guess as to when the next meeting is. I’m guessing around the 14th/15th, maybe May, maybe June, …

@holroy Sorry for being imprecise. What I am looking for to identify the next meeting date based on the current time.

In the given example, the javascript code should return 15.04.23, as the current time of this post writing is April. 7th. Do you have an idea on how to achieve this?

I tried the following Regular Expression, but it does not return the contents of the parenthesis but the entire line.

/^## .* on (\d*)\.(\d*)\.(\d*).*$/gm;