diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-11-15 21:24:52 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-12-02 22:59:44 +0100 |
commit | d547dca676553a83c077b34f735c9d2ff5d41dcd (patch) | |
tree | 0d65703bc29711eda99a9ed8119304bbcd7958e7 /worker/notmuch/worker.go | |
parent | ce7fbd27ee8f41adfa8e33002ccf965c6a917e5a (diff) | |
download | aerc-d547dca676553a83c077b34f735c9d2ff5d41dcd.tar.gz |
daterange: support relative terms
Support relative terms when writing date ranges in the search and filter
commands with the -d flag. Syntax is inspired by the notmuch search
terms.
Terms can be written with spaces or underscores for a better
readability, so both "this_week" and "this week" are allowed. Terms are
not case-sensitive.
Some terms can be prefixed with either "this" or "last" where applicable
("this" is assumed by default if omitted):
- "today", "yesterday"
- ("this"|"last") "year", "month", "week"
- all weekdays (e.g. "Tuesday", "last_wed")
- all months (e.g. "January", "last_feb")
Note that "month" should always be spelled out to prevent a possible
ambiguity with "Monday".
Weekdays and months do not need to be written out completely, i.e.
"February..March" and "Feb..Mar" are both understood.
Relative date terms can be used with the <N (year|month|week|day)>
syntax where N is a positive integer indicating the number of time units
in the past from today. The units can be abbreviated with a single
letter, e.g. "1w 1d.." is the same as "1 week 1 day..".
More examples:
:filter -d yesterday
:filter -d last_monday..
:filter -d mon..sat
:filter -d 1y1m1w1d..
:search -d this_week "PATCH aerc"
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/notmuch/worker.go')
0 files changed, 0 insertions, 0 deletions