What date macros are there? (!today etc.)

You can use !! to insert dates. It accepts some date formats and some natural language as argument.

I found the following:

  • !!YYYY-MM-DD like !!2021-01-10 for 10th january 2021
  • !!yesterday, !!today, !!tomorrow
  • !!XInterval[ago] where X is an integer (1,2,…), Interval is day, week, month, year and ago is optional to go into the past instead of the future
    • instead of ago you can also prefix with last
  • !!Weekday where weekday is mon or monday
    • !!lastWeekday gets the weekday of last week, e.g. lastmonday is the monday of last week which could be 2 mondays ago

Is this documented anywhere? Is there more? What is the underlying library used to parse this? https://github.com/wanasit/chrono?

Yep, it’s chrono!

It is designed to handle most date/time format and extract information from any given text:

* *Today* ,  *Tomorrow* ,  *Yesterday* ,  *Last Friday* , etc
* *17 August 2013 - 19 August 2013*
* *This Friday from 13:00 - 16.00*
* *5 days ago*
* *2 weeks from now*
* *Sat Aug 17 2013 18:40:39 GMT+0900 (JST)*
* *2014-11-30T08:15:30-05:30*