hledger/tests/reporting-intervals.test

51 lines
1.5 KiB
Plaintext
Raw Normal View History

#
# monthly reporting interval, no end dates, shows just the intervals with data:
2010-05-22 04:52:45 +04:00
bin/hledger -f- register --period 'monthly'
<<<
2010/2/1 x
a 1
b
>>>
2010/02/01 - 2010/02/28 a 1 1
b -1 0
>>>=0
#
# with --empty, the same:
2010-05-22 04:52:45 +04:00
bin/hledger -f- register --period 'monthly' --empty
<<<
2010/2/1 x
a 1
b
>>>
2010/02/01 - 2010/02/28 a 1 1
b -1 0
>>>=0
#
# with --empty and start/end dates, show all intervals covering the specified period
2010-05-22 04:52:45 +04:00
bin/hledger -f- register --period 'monthly from 2010/1/10 to 2010/3/15' --empty
<<<
2010/2/1 x
a 1
b
>>>
2010/01/01 - 2010/01/31 0 0
2010/02/01 - 2010/02/28 a 1 1
b -1 0
2010/03/01 - 2010/03/31 0 0
>>>=0
#
# with just one start/end date, get the other from the data
2010-05-22 04:52:45 +04:00
bin/hledger -f- register --period 'monthly from 2010/1/10' --empty
<<<
2010/2/1 x
a 1
b
>>>
2010/01/01 - 2010/01/31 0 0
2010/02/01 - 2010/02/28 a 1 1
b -1 0
>>>=0