Add docs for datetime queries

This commit is contained in:
discopatrick 2017-06-01 13:11:40 +01:00
parent e1101d4e95
commit 95eeec937c

View file

@ -188,6 +188,33 @@ Find all items with a file modification time between 2008-12-01 and
$ beet ls 'mtime:2008-12-01..2008-12-02'
You can also add an optional time value to date queries, specifying hours,
minutes, and seconds.
Times are separated from dates by a space, an uppercase 'T' or a lowercase
't', for example: ``2008-12-01T23:59:59``. If you specify a time, then the
date must contain a year, month, and day. The minutes and seconds are
optional.
Here is an example that finds all items added on 2008-12-01 at or after 22:00
but before 23:00::
$ beet ls 'added:2008-12-01T22'
Find all items added on or after 2008-12-01 22:45::
$ beet ls 'added:2008-12-01T22:45..'
Find all items added on 2008-12-01, at or after 22:45:20 but before 22:45:41::
$ beet ls 'added:2008-12-01T22:45:20..2008-12-01T22:45:40'
Examples of each time format::
$ beet ls 'added:2008-12-01T22:45:20'
$ beet ls 'added:2008-12-01t22:45:20'
$ beet ls 'added:2008-12-01 22:45:20'
.. _not_query:
Query Term Negation