Alex_A
1
Hi,
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!
Thanks,
Alex
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.
Alex_A
4
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.
Roms
5
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:
Current:
\date(short)
\date(day: tomorrow)
Proposed:
\date(format: short)
\date(tomorrow)
Alex_A
7
That seems like a good change, thanks!