Best way to use natural language with \date text action


If I want to insert a date using natural language, e.g. 5 days ago, is “\date(day: 5 days ago)” the best way?

I thought maybe just “\date(5 days ago)” would work but that gives me “5 24pm202414 pm2460365”!

In the Text Actions Cheat Sheet, “day” is not mentioned. It shows:

in, for, offset - a different date than today

These all work except for “\date(offset: 5 days ago)”, which gives me today’s date!



Offset would take an integer number (i.e. 1 is tomorrow, 2 is day after tomorrow, -1 is yesterday etc).

We’ll see if we can make it a bit smarter to prevent having to use the day: argument prefix.

Ooh I like that, ‘\date(offset: -5)’ is much better.

Though if it is feasible to make it ‘\date(-5)’ ‘\date(last thurs)’, etc, that would be even quicker.

And even faster with text replacement.
For example: d-5 = \date(offset: -5)

1 Like

We’ll consider making the default take the date and instead require choosing a different format to require the explicit parameter:

\date(day: tomorrow)

\date(format: short)

That seems like a good change, thanks!