2014-12-25 03:11:30 +03:00
|
|
|
# 1.
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f - register --date2
|
2009-07-09 03:37:44 +04:00
|
|
|
<<<
|
2009-12-12 06:03:41 +03:00
|
|
|
2009/1/1=2010/1/1 x
|
2009-07-09 03:37:44 +04:00
|
|
|
a 1
|
|
|
|
b
|
|
|
|
>>>
|
2013-04-13 01:56:41 +04:00
|
|
|
2010/01/01 x a 1 1
|
|
|
|
b -1 0
|
2011-08-15 02:15:39 +04:00
|
|
|
>>>=0
|
2014-12-25 03:11:30 +03:00
|
|
|
|
|
|
|
# 2. -b/-e/-p match the secondary date if --date2 is present (also, the secondary date is displayed)
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- register -p 2014/1/2 --date2
|
2014-12-25 03:11:30 +03:00
|
|
|
<<<
|
|
|
|
2014/1/1=1/2
|
|
|
|
(a) 1
|
|
|
|
|
|
|
|
2014/1/3
|
|
|
|
(b) 1
|
|
|
|
>>>
|
|
|
|
2014/01/02 (a) 1 1
|
|
|
|
>>>=0
|
|
|
|
|
|
|
|
# 3. date: matches the secondary date if --date2 is present (on the command line, at least)
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- register date:2014/1/2 --date2
|
2014-12-25 03:11:30 +03:00
|
|
|
<<<
|
|
|
|
2014/1/1=1/2
|
|
|
|
(a) 1
|
|
|
|
|
|
|
|
2014/1/3
|
|
|
|
(b) 1
|
|
|
|
>>>
|
|
|
|
2014/01/02 (a) 1 1
|
|
|
|
>>>=0
|
|
|
|
|
|
|
|
# 4. date2: matches the secondary date
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- register date2:2014/1/2
|
2014-12-25 03:11:30 +03:00
|
|
|
<<<
|
|
|
|
2014/1/1=1/2
|
|
|
|
(a) 1
|
|
|
|
|
|
|
|
2014/1/3
|
|
|
|
(b) 1
|
|
|
|
>>>
|
|
|
|
2014/01/01 (a) 1 1
|
|
|
|
>>>=0
|
|
|
|
|
|
|
|
# 5. you need to add --date2 if you also want the secondary date displayed
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- register date2:2014/1/2 --date2
|
2014-12-25 03:11:30 +03:00
|
|
|
<<<
|
|
|
|
2014/1/1=1/2
|
|
|
|
(a) 1
|
|
|
|
|
|
|
|
2014/1/3
|
|
|
|
(b) 1
|
|
|
|
>>>
|
|
|
|
2014/01/02 (a) 1 1
|
|
|
|
>>>=0
|
|
|
|
|
|
|
|
# 3. date2: matching is not affected by --date2
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- register date2:2014/1/1 --date2
|
2014-12-25 03:11:30 +03:00
|
|
|
<<<
|
|
|
|
2014/1/1=1/2
|
|
|
|
(a) 1
|
|
|
|
|
|
|
|
2014/1/3
|
|
|
|
(b) 1
|
|
|
|
>>>
|
|
|
|
>>>=0
|
|
|
|
|