mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 10:47:29 +03:00
71 lines
1.6 KiB
Plaintext
71 lines
1.6 KiB
Plaintext
# 1. monthly reporting interval, no end dates, shows just the intervals with data:
|
|
bin/hledger -f- register --period 'monthly'
|
|
<<<
|
|
2011/2/1
|
|
(a) 1
|
|
>>>
|
|
2011/02/01 - 2011/02/28 a 1 1
|
|
>>>=0
|
|
|
|
# 2. or with a query pattern, just the intervals with matched data:
|
|
bin/hledger -f- register --period 'monthly' b
|
|
<<<
|
|
2011/1/1
|
|
(a) 1
|
|
|
|
2011/2/1
|
|
(b) 1
|
|
>>>
|
|
2011/02/01 - 2011/02/28 b 1 1
|
|
>>>=0
|
|
|
|
# 3. with --empty, show all intervals spanned by the journal
|
|
# (unlike current ledger, but more useful)
|
|
bin/hledger -f- register --period 'monthly' b --empty
|
|
<<<
|
|
2011/1/1
|
|
(a) 1
|
|
|
|
2011/2/1
|
|
(b) 1
|
|
|
|
2011/3/1
|
|
(c) 1
|
|
>>>
|
|
2011/01/01 - 2011/01/31 0 0
|
|
2011/02/01 - 2011/02/28 b 1 1
|
|
2011/03/01 - 2011/03/31 0 1
|
|
>>>=0
|
|
|
|
# 4. any specified begin/end dates limit the intervals reported
|
|
bin/hledger -f- register --period 'monthly to 2011/3/1' b --empty
|
|
<<<
|
|
2011/1/1
|
|
(a) 1
|
|
|
|
2011/2/1
|
|
(b) 1
|
|
|
|
2011/3/1
|
|
(c) 1
|
|
>>>
|
|
2011/01/01 - 2011/01/31 0 0
|
|
2011/02/01 - 2011/02/28 b 1 1
|
|
>>>=0
|
|
|
|
# 5. likewise for date-restricting display expressions
|
|
bin/hledger -f- register --period 'monthly to 2011/2/1' b --empty --display 'd<[2011/2/1]'
|
|
<<<
|
|
2011/1/1
|
|
(a) 1
|
|
|
|
2011/2/1
|
|
(b) 1
|
|
|
|
2011/3/1
|
|
(c) 1
|
|
>>>
|
|
2011/01/01 - 2011/01/31 0 0
|
|
>>>=0
|
|
|