docs: dates section tweaks
This commit is contained in:
parent
859a79e16e
commit
b7f38a0937
22
MANUAL
22
MANUAL
@ -469,21 +469,23 @@ matched against the posting's transaction's description.
|
|||||||
To negate a pattern, prefix it with ``not:``. Note: with multiple
|
To negate a pattern, prefix it with ``not:``. Note: with multiple
|
||||||
prefixes, not: should go last, eg: ``desc:not:someregexp``.
|
prefixes, not: should go last, eg: ``desc:not:someregexp``.
|
||||||
|
|
||||||
Smart dates
|
Dates
|
||||||
"""""""""""
|
"""""
|
||||||
|
|
||||||
hledger accepts "smart dates" in most places a date can be used, such as:
|
hledger accepts "smart dates" in most places a date can be used, such as:
|
||||||
-b and -e options, and `period expressions <#period-expressions>`_
|
-b and -e options, and `period expressions <#period-expressions>`_
|
||||||
(but actually, not in the ledger file, which has more limited date parsing.)
|
(but actually, not in the ledger file, which has more limited date parsing.)
|
||||||
Here are some examples:
|
Here are some examples:
|
||||||
|
|
||||||
- 2009/1/1, 2009/01/01, 2009-1-1, 2009.1.1, 2009/1, 2009 (january 1, 2009)
|
- ``2009/1/1``, ``2009/01/01``, ``2009-1-1``, ``2009.1.1``, ``2009/1``, ``2009`` (january 1, 2009)
|
||||||
- 1/1, january, jan, this year (january 1, this year)
|
- ``1/1``, ``january``, ``jan``, ``this year`` (january 1, this year)
|
||||||
- next year (january 1, next year)
|
- ``next year`` (january 1, next year)
|
||||||
- this month (the 1st of the current month)
|
- ``this month`` (the 1st of the current month)
|
||||||
- this week (the most recent monday)
|
- ``this week`` (the most recent monday)
|
||||||
- last week (the monday of the week before this one)
|
- ``last week`` (the monday of the week before this one)
|
||||||
- today, yesterday, tomorrow
|
- ``today``, ``yesterday``, ``tomorrow``
|
||||||
|
|
||||||
|
Spaces are optional, so eg: ``-p lastmonth`` is valid.
|
||||||
|
|
||||||
Period expressions
|
Period expressions
|
||||||
""""""""""""""""""
|
""""""""""""""""""
|
||||||
@ -504,7 +506,7 @@ don't run two dates together::
|
|||||||
-p2009/1/1to2009/4/1
|
-p2009/1/1to2009/4/1
|
||||||
-p"2009/1/1 2009/4/1"
|
-p"2009/1/1 2009/4/1"
|
||||||
|
|
||||||
Dates are `smart dates <#smart-dates>`_, so if the current year is 2009, the above can also
|
Dates are `smart dates <#dates>`_, so if the current year is 2009, the above can also
|
||||||
be written as::
|
be written as::
|
||||||
|
|
||||||
-p "1/1 to 4/1"
|
-p "1/1 to 4/1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user