diff --git a/tests/account-aliases.test b/tests/account-aliases.test index 903294a40..1aeddd0c9 100644 --- a/tests/account-aliases.test +++ b/tests/account-aliases.test @@ -61,12 +61,12 @@ alias /A (.)/=\1 c $ hledger -f- print -2011/01/01 +2011-01-01 b b 1 b b 2 c -2011/01/01 +2011-01-01 b 1 b 2 c @@ -85,7 +85,7 @@ $ hledger -f- print c $ hledger -f- print --alias '/A (.)/=a' --alias /a/=b -2011/01/01 +2011-01-01 b 1 b 2 c @@ -104,7 +104,7 @@ alias E=F [x:a:x] $ hledger -f- print --alias /a/=A --alias /B/=C --alias /B/=D --alias /C/=D -2011/01/01 +2011-01-01 [E:x] 1 [x:A:x] @@ -144,7 +144,7 @@ alias a = b a 1 b -1 $ hledger -f- reg '^a$' '^b$' -2017/01/01 b 1 1 +2017-01-01 b 1 1 b -1 0 # recursive aliases https://github.com/simonmichael/hledger/issues/1055 @@ -155,7 +155,7 @@ $ hledger -f- reg '^a$' '^b$' (one) 1 $ hledger -f- --alias "one=two" --alias "two=three" print -2000/01/01 +2000-01-01 (three) 1 >=0 @@ -169,7 +169,7 @@ alias one = two (one) 1 $ hledger -f- print -2000/01/01 +2000-01-01 (three) 1 >=0 @@ -182,7 +182,7 @@ alias one = two (one) 1 $ hledger -f- print -2000/01/01 +2000-01-01 (two) 1 >=0 @@ -193,7 +193,7 @@ $ hledger -f- print (one) 1 $ hledger -f- --alias "/one/=two" --alias "/two/=three" print -2000/01/01 +2000-01-01 (three) 1 >=0 @@ -207,7 +207,7 @@ alias /one/ = two (one) 1 $ hledger -f- print -2000/01/01 +2000-01-01 (three) 1 >=0 @@ -220,7 +220,7 @@ alias /one/ = two (one) 1 $ hledger -f- print -2000/01/01 +2000-01-01 (two) 1 >=0 diff --git a/tests/amount-rendering.test b/tests/amount-rendering.test index b0f1c94b4..d93557250 100644 --- a/tests/amount-rendering.test +++ b/tests/amount-rendering.test @@ -7,7 +7,7 @@ hledger -f - print --explicit b USD 1 ; a dollar c ; a euro and a dollar >>> -2010/01/01 +2010-01-01 a EUR 1 ; a euro b USD 1 ; a dollar c EUR -1 ; a euro and a dollar @@ -23,7 +23,7 @@ hledger -f - register b USD 1 ; a dollar c ; a euro and a dollar >>> -2010/01/01 a EUR 1 EUR 1 +2010-01-01 a EUR 1 EUR 1 b USD 1 EUR 1 USD 1 c EUR -1 @@ -53,7 +53,7 @@ hledger -f- print --explicit --empty a $0.00 @ 3EUR b >>> -2010/03/01 x +2010-03-01 x a 0 @ 3EUR b 0 @@ -93,14 +93,14 @@ D 1000,00€ # b USD 1 ; a dollar # c ; a euro and a dollar # >>> -# 2010/01/01 +# 2010-01-01 # a EUR 1 @ USD 1.1 ; a euro # b USD 1 ; a dollar # EUR -1 @ USD 1.1 # c USD -1 ; a euro and a dollar # ## -# 2010/01/01 +# 2010-01-01 # a EUR 1 @ USD 1.1 ; a euro # b USD 1.0 ; a dollar # c USD -2.1 ; a euro and a dollar @@ -115,7 +115,7 @@ D 1000,00€ # b USD 1 ; a dollar # c ; a euro and a dollar # >>> -# 2010/01/01 a EUR 1 EUR 1 +# 2010-01-01 a EUR 1 EUR 1 # EUR 1 # b USD 1.0 USD 1.0 # EUR 1 diff --git a/tests/balance/219.test b/tests/balance/219.test index 6892a606e..922422846 100644 --- a/tests/balance/219.test +++ b/tests/balance/219.test @@ -4,7 +4,7 @@ hledger -f balance-multicol.journal bal -MEH --no-total date:2013/1 --tree --fla >>> Ending balances (historical) in 2013/01: - || 2013/01/31 + || 2013-01-31 =================++============ assets:checking || 10 >>>= 0 @@ -14,7 +14,7 @@ hledger -f balance-multicol.journal bal -MEH --no-total date:2013/1 --flat --tre >>> Ending balances (historical) in 2013/01: - || 2013/01/31 + || 2013-01-31 ============++============ assets || 10 checking || 10 diff --git a/tests/balance/intervals.test b/tests/balance/intervals.test index 0741ab1df..d913569db 100644 --- a/tests/balance/intervals.test +++ b/tests/balance/intervals.test @@ -3,12 +3,12 @@ # 1. Here are the postings used in most tests below: hledger -f balance-multicol.journal register >>> -2012/12/31 (assets:checking) 10 10 -2013/01/01 (assets:checking) 1 11 -2013/01/15 (assets:checking) -1 10 -2013/02/01 (assets:cash) 1 11 -2013/02/02 (assets) 1 12 -2013/03/01 (assets:checking) 1 13 +2012-12-31 (assets:checking) 10 10 +2013-01-01 (assets:checking) 1 11 +2013-01-15 (assets:checking) -1 10 +2013-02-01 (assets:cash) 1 11 +2013-02-02 (assets) 1 12 +2013-03-01 (assets:checking) 1 13 >>>=0 # 2. A period balance (flow) report. --no-total also works but isn't pretty. @@ -49,7 +49,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 =================++==================================== assets || 0 1 1 assets:cash || 0 1 1 @@ -65,7 +65,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative no >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 =================++==================================== assets || 0 1 1 assets:checking || 0 0 1 @@ -78,7 +78,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 =================++==================================== assets || 0 1 1 assets:cash || 0 1 1 @@ -106,7 +106,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$ --c >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 =================++==================================== assets:cash || 0 1 1 assets:checking || 0 0 1 @@ -119,7 +119,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 =================++==================================== assets || 0 1 1 assets:cash || 0 1 1 @@ -159,7 +159,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --cum >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 ========++==================================== assets || 0 2 3 --------++------------------------------------ @@ -171,7 +171,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --his >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 ========++==================================== assets || 10 12 13 --------++------------------------------------ @@ -197,7 +197,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative -- >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 ============++==================================== assets || 0 2 3 cash || 0 1 1 @@ -211,7 +211,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical -- >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 + || 2013-01-31 2013-02-28 2013-03-31 ============++==================================== assets || 10 12 13 cash || 0 1 1 diff --git a/tests/balancesheet.test b/tests/balancesheet.test index b6a45843a..318b9cf13 100644 --- a/tests/balancesheet.test +++ b/tests/balancesheet.test @@ -7,7 +7,7 @@ hledger -f - balancesheet >>> Balance Sheet 2016/01/01 - || 2016/01/01 + || 2016-01-01 =============++============ Assets || -------------++------------ @@ -50,7 +50,7 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' >>> Balance Sheet 2008/01/31,,2008/12/31 - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 + || 2008-01-31 2008-02-29 2008-03-31 2008-04-30 2008-05-31 2008-06-30 2008-07-31 2008-08-31 2008-09-30 2008-10-31 2008-11-30 2008-12-31 ======================++================================================================================================================================================ Assets || ----------------------++------------------------------------------------------------------------------------------------------------------------------------------------ @@ -96,7 +96,7 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' --tree >>> Balance Sheet 2008/01/31,,2008/12/31 - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 + || 2008-01-31 2008-02-29 2008-03-31 2008-04-30 2008-05-31 2008-06-30 2008-07-31 2008-08-31 2008-09-30 2008-10-31 2008-11-30 2008-12-31 ==============++================================================================================================================================================ Assets || --------------++------------------------------------------------------------------------------------------------------------------------------------------------ @@ -125,7 +125,7 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' -NAT >>> Balance Sheet 2008/01/31,,2008/12/31 - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average + || 2008-01-31 2008-02-29 2008-03-31 2008-04-30 2008-05-31 2008-06-30 2008-07-31 2008-08-31 2008-09-30 2008-10-31 2008-11-30 2008-12-31 Average ======================++========================================================================================================================================================= Assets || ----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -150,7 +150,7 @@ hledger -f- balancesheet >>> Balance Sheet 2017/01/01 - || 2017/01/01 + || 2017-01-01 =============++============ Assets || -------------++------------ @@ -176,7 +176,7 @@ hledger -f- balancesheet --flat >>> Balance Sheet 2017/01/01 - || 2017/01/01 + || 2017-01-01 =============++============ Assets || -------------++------------ @@ -201,7 +201,7 @@ hledger -f- balancesheet -YA >>> Balance Sheet 2017/12/31 - || 2017/12/31 Average + || 2017-12-31 Average =============++===================== Assets || -------------++--------------------- @@ -227,7 +227,7 @@ hledger -f - balancesheet -M --pretty-tables >>> Balance Sheet 2016/01/31 - ║ 2016/01/31 + ║ 2016-01-31 ═════════════╬════════════ Assets ║ ─────────────╫──────────── @@ -264,7 +264,7 @@ hledger -f - balancesheet >>> Balance Sheet 2018/10/03 - || 2018/10/03 + || 2018-10-03 =====================================++============ Assets || -------------------------------------++------------ diff --git a/tests/cashflow.test b/tests/cashflow.test index e26038c43..315dadf86 100644 --- a/tests/cashflow.test +++ b/tests/cashflow.test @@ -177,7 +177,7 @@ hledger -f sample.journal cashflow -p 'monthly in 2008' -A --historical >>> Cashflow Statement 2008/01/31,,2008/12/31 (Historical Ending Balances) - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average + || 2008-01-31 2008-02-29 2008-03-31 2008-04-30 2008-05-31 2008-06-30 2008-07-31 2008-08-31 2008-09-30 2008-10-31 2008-11-30 2008-12-31 Average ======================++========================================================================================================================================================= Cash flows || ----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/tests/cli/multiple-files.test b/tests/cli/multiple-files.test index 8cf9d28bf..79220c277 100644 --- a/tests/cli/multiple-files.test +++ b/tests/cli/multiple-files.test @@ -24,15 +24,15 @@ Income Statement 2014/01/01-2014/01/02 # 2. aliases etc. in files currently don't carry over to subsequent files hledger print -f personal.journal -f business.journal -f alias.journal -f personal.journal >>> -2014/01/01 +2014-01-01 expenses:office supplies $1 assets:business checking -2014/01/02 +2014-01-02 expenses:food $1 assets:cash -2014/01/02 +2014-01-02 expenses:food $1 assets:cash @@ -46,14 +46,14 @@ hledger print -f personal.journal -f business.journal -f alias.journal -f person # 3. files can be of different formats hledger print -f personal.journal -f ../journal/a.timeclock -f ../journal/b.timedot >>> -2014/01/02 +2014-01-02 expenses:food $1 assets:cash -2016/01/01 * 12:00-16:00 +2016-01-01 * 12:00-16:00 (a:aa) 4.00h -2016/01/01 * +2016-01-01 * (b.bb) 1.00 >>>2 @@ -62,7 +62,7 @@ hledger print -f personal.journal -f ../journal/a.timeclock -f ../journal/b.time # 4. same-date transactions in different files are shown in the right order hledger -f a.j -f b.j reg >>> -2018/01/01 a1 (a) 1 1 -2018/01/01 b1 (b) 1 2 +2018-01-01 a1 (a) 1 1 +2018-01-01 b1 (b) 1 2 >>>2 >>>=0 diff --git a/tests/cli/query-args.test b/tests/cli/query-args.test index a3cf81313..557892ce2 100644 --- a/tests/cli/query-args.test +++ b/tests/cli/query-args.test @@ -5,7 +5,7 @@ hledger -f- register 'a a' a a 1 b >>> -2010/03/01 x a a 1 1 +2010-03-01 x a a 1 1 >>>=0 # @@ -20,7 +20,7 @@ hledger -f- register desc:'x x' a 1 b >>> -2010/03/02 x x a 1 1 +2010-03-02 x x a 1 1 b -1 0 >>>=0 @@ -32,6 +32,6 @@ hledger -f- register 'a a' "'b" a a 1 'b >>> -2011/09/11 a a 1 1 +2011-09-11 a a 1 1 'b -1 0 >>>=0 diff --git a/tests/close.test b/tests/close.test index 449173536..93c13555e 100644 --- a/tests/close.test +++ b/tests/close.test @@ -19,13 +19,13 @@ assets:cash $ hledger close -f- -p 2016 assets liabilities -2016/12/31 closing balances +2016-12-31 closing balances assets:bank $-80 = $0 assets:cash $-10 = $0 liabilities $-25 = $0 equity:closing balances $115 -2017/01/01 opening balances +2017-01-01 opening balances assets:bank $80 = $80 assets:cash $10 = $10 liabilities $25 = $25 @@ -39,11 +39,11 @@ $ hledger close -f- -p 2016 assets liabilities (a) 1 $ hledger close -f- -b2017/6/1 -e2018 -2017/12/31 closing balances +2017-12-31 closing balances a -1 = 0 equity:closing balances 1 -2018/01/01 opening balances +2018-01-01 opening balances a 1 = 1 equity:opening balances -1 @@ -69,7 +69,7 @@ $ hledger close -f- -b2017/6/1 -e2018 assets:cash $ hledger close -f- -p 2016 assets liabilities --opening -2017/01/01 opening balances +2017-01-01 opening balances assets:bank $80 = $80 assets:cash $10 = $10 liabilities $25 = $25 @@ -97,7 +97,7 @@ $ hledger close -f- -p 2016 assets liabilities --opening assets:cash $ hledger close -f- -p 2016 assets liabilities --closing -2016/12/31 closing balances +2016-12-31 closing balances assets:bank $-80 = $0 assets:cash $-10 = $0 liabilities $-25 = $0 @@ -125,13 +125,13 @@ $ hledger close -f- -p 2016 assets liabilities --closing assets:cash $ hledger close -f- -p 2016 assets liabilities --opening --closing -2016/12/31 closing balances +2016-12-31 closing balances assets:bank $-80 = $0 assets:cash $-10 = $0 liabilities $-25 = $0 equity:closing balances $115 -2017/01/01 opening balances +2017-01-01 opening balances assets:bank $80 = $80 assets:cash $10 = $10 liabilities $25 = $25 @@ -149,13 +149,13 @@ $ hledger close -f- -p 2016 assets liabilities --opening --closing equity $ hledger -f- close assets -p 2019 -2019/12/31 closing balances +2019-12-31 closing balances assets -1A @ 1B assets -1A @ 1C = 0A equity:closing balances 1A @ 1B equity:closing balances 1A @ 1C -2020/01/01 opening balances +2020-01-01 opening balances assets 1A @ 1B assets 1A @ 1C = 2A equity:opening balances -1A @ 1B @@ -174,13 +174,13 @@ $ hledger -f- close assets -p 2019 (assets) 1A @ 2B $ hledger -f- close assets -p 2019 -2019/12/31 closing balances +2019-12-31 closing balances assets -1A @ 1B assets -1A @ 2B = 0A equity:closing balances 1A @ 1B equity:closing balances 1A @ 2B -2020/01/01 opening balances +2020-01-01 opening balances assets 1A @ 1B assets 1A @ 2B = 2A equity:opening balances -1A @ 1B @@ -213,7 +213,7 @@ $ hledger -f- close assets -p 2019 liabilities:employer $ hledger -f- close -p 2016 assets liabilities -2016/12/31 closing balances +2016-12-31 closing balances assets:bank -5,733.00 EUR = 0.00 EUR liabilities:employer $-10,000.00 liabilities:employer $5,000.00 @ 0.93 EUR @@ -224,7 +224,7 @@ $ hledger -f- close -p 2016 assets liabilities equity:closing balances $-5,000.00 @ 0.95 EUR equity:closing balances 5,734.00 EUR -2017/01/01 opening balances +2017-01-01 opening balances assets:bank 5,733.00 EUR = 5,733.00 EUR liabilities:employer $10,000.00 liabilities:employer $-5,000.00 @ 0.93 EUR diff --git a/tests/csv.test b/tests/csv.test index f60d7a642..ca9f178e3 100644 --- a/tests/csv.test +++ b/tests/csv.test @@ -8,7 +8,7 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 income:unknown $-50 @@ -28,11 +28,11 @@ amount-out %4 currency $ $ ./hledger-csv -2009/09/10 Flubber Co🎅 +2009-09-10 Flubber Co🎅 Assets:MyAccount $50 income:unknown $-50 -2009/09/11 Flubber Co🎅 +2009-09-11 Flubber Co🎅 Assets:MyAccount $-50 expenses:unknown $50 @@ -51,7 +51,7 @@ if Flubber account2 acct comment cmt $ ./hledger-csv -2009/09/10 Flubber Co ; cmt +2009-09-10 Flubber Co ; cmt assets:myacct $50 acct $-50 @@ -68,7 +68,7 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 = $123 income:unknown $-50 @@ -86,11 +86,11 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 = $123 income:unknown $-50 -2009/09/11 Blubber Co +2009-09-11 Blubber Co assets:myacct $60 income:unknown $-60 @@ -108,11 +108,11 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 = $123 income:unknown $-50 -2009/09/11 Blubber Co +2009-09-11 Blubber Co assets:myacct $60 income:unknown $-60 @@ -135,11 +135,11 @@ amount -%payment account1 liabilities:bank account2 expense:other $ ./hledger-csv -2009/10/09 +2009-10-09 liabilities:bank $-50 expense:other $50 -2009/11/09 +2009-11-09 liabilities:bank $60 expense:other $-60 @@ -160,11 +160,11 @@ amount-out %4 currency $ $ ./hledger-csv -2009/09/10 Flubber Co🎅 +2009-09-10 Flubber Co🎅 Assets:MyAccount $50 income:unknown $-50 -2009/09/11 Flubber Co🎅 +2009-09-11 Flubber Co🎅 Assets:MyAccount $-50 expenses:unknown $50 @@ -181,7 +181,7 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 income:unknown $-50 = $123 @@ -198,7 +198,7 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 = $321 income:unknown $-50 = $123 @@ -218,7 +218,7 @@ account3 expenses:tax account4 the:remainder $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50.000 = $321.000 expenses:unknown = $123.000 expenses:tax $0.234 ; VAT @@ -239,7 +239,7 @@ account3 expenses:tax account4 the:remainder $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 = $321 expenses:unknown = $123 expenses:tax £0.234 ; VAT @@ -261,11 +261,11 @@ amount-out %4 currency $ $ ./hledger-csv -2009/09/10 Flubber Co🎅 +2009-09-10 Flubber Co🎅 Assets:MyAccount $50 income:unknown $-50 -2009/09/11 Flubber Co🎅 +2009-09-11 Flubber Co🎅 Assets:MyAccount $-50 expenses:unknown $50 @@ -291,7 +291,7 @@ date-format %d/%Y/%m currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co Co Co +2009-09-10 Flubber Co Co Co assets:myacct $50 income:unknown $-50 @@ -310,7 +310,7 @@ if Flubber account1 assets:%account1 amount-in (%amount-in) $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $-50 expenses:unknown $50 @@ -334,7 +334,7 @@ date %1 date-format %m/%d/%Y description %description for %itemtitle $ ./hledger-csv -2018/12/22 (123456789) Someone for Joyful Systems +2018-12-22 (123456789) Someone for Joyful Systems sm:assets:online:paypal $9.41 = $57.60 sm:expenses:unknown JS:expenses:banking:paypal $-0.59 @@ -383,11 +383,11 @@ if MIDDLE skip 3 $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 income:unknown $-50 -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 income:unknown $-50 @@ -407,15 +407,15 @@ description Assets Update account1 assets account2 income $ ./hledger-csv -2018/10/15 Assets Update +2018-10-15 Assets Update assets = EUR 100 income -2018/10/16 Assets Update +2018-10-16 Assets Update assets = EUR 200 income -2018/10/17 Assets Update +2018-10-17 Assets Update assets = EUR 300 income @@ -431,7 +431,7 @@ amount comment x $ ./hledger-csv -2018/10/15 ; x +2018-10-15 ; x >=0 @@ -465,12 +465,12 @@ if ,Empty fee skip $ ./hledger-csv -2018/12/22 (123456789) Someone for Joyful Systems +2018-12-22 (123456789) Someone for Joyful Systems sm:assets:online:paypal $9.41 = $57.60 sm:expenses:unknown JS:expenses:banking:paypal $-0.59 -2018/12/22 (10101010101) Someone for Joyful Systems +2018-12-22 (10101010101) Someone for Joyful Systems sm:assets:online:paypal $7.77 = $88.66 sm:expenses:unknown $-7.77 @@ -488,7 +488,7 @@ currency $ account1 assets:myacct $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co assets:myacct $50 ==* $123 income:unknown $-50 @@ -505,7 +505,7 @@ currency $ account1 (assets:myacct) $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co (assets:myacct) $50 = $123 >=0 @@ -522,7 +522,7 @@ account1 [assets:myacct] account2 [assets:another-acct] $ ./hledger-csv -2009/09/10 Flubber Co +2009-09-10 Flubber Co [assets:myacct] $50 [assets:another-acct] $-50 @@ -553,7 +553,7 @@ $ ./hledger-csv #account2 (a) # #$ ./hledger-csv -#2019/01/01 +#2019-01-01 # (a) 1 # #>=0 diff --git a/tests/forecast.test b/tests/forecast.test index 608c59b35..8400541a9 100644 --- a/tests/forecast.test +++ b/tests/forecast.test @@ -46,11 +46,11 @@ hledger print -b 2016-11 -e 2017-02 -f - --forecast expenses:grocery $30 assets:cash >>> -2016/12/31 +2016-12-31 expenses:housing $600 assets:cash -2017/01/01 * marked cleared, and with a description +2017-01-01 * marked cleared, and with a description ; generated-transaction: ~ monthly from 2016/1 income $-1000 expenses:food $20 @@ -76,7 +76,7 @@ hledger register -b 2016-11 -e 2017-02 -f - --forecast tag:a expenses:grocery $30 assets:cash >>> -2017/01/01 income $-1000 $-1000 +2017-01-01 income $-1000 $-1000 expenses:food $20 $-980 expenses:leisure $15 $-965 expenses:grocery $30 $-935 @@ -99,9 +99,9 @@ hledger register -b 2015-12 -e 2017-02 -f - assets:cash --forecast income $-10000 ; bonus assets:cash >>> -2016/01/01 assets:cash $-10 $-10 -2016/12/02 assets:cash $-600 $-610 -2017/01/01 assets:cash $10000 $9390 +2016-01-01 assets:cash $-10 $-10 +2016-12-02 assets:cash $-600 $-610 +2017-01-01 assets:cash $10000 $9390 >>>2 >>>=0 @@ -117,7 +117,7 @@ Y 2000 2000/1/1 real >>> -2000/02/01 forecast +2000-02-01 forecast ; generated-transaction: ~ 2/1 >>>2 @@ -134,7 +134,7 @@ Y 2000 2000/1/1 real >>> -2000/01/15 forecast +2000-01-15 forecast ; generated-transaction: ~ 15 >>>2 @@ -151,7 +151,7 @@ Y 2000 2000/1/1 real >>> -2000/02/01 forecast +2000-02-01 forecast ; generated-transaction: ~ next month >>>2 diff --git a/tests/i18n/unicode-account-matching.test b/tests/i18n/unicode-account-matching.test index 39349a3b2..dc87ebce2 100644 --- a/tests/i18n/unicode-account-matching.test +++ b/tests/i18n/unicode-account-matching.test @@ -4,5 +4,5 @@ hledger -f - register τράπ τράπεζα 10 руб नकद >>> -2009/01/01 проверка τράπεζα 10 руб 10 руб +2009-01-01 проверка τράπεζα 10 руб 10 руб >>>=0 diff --git a/tests/i18n/unicode-description-matching.test b/tests/i18n/unicode-description-matching.test index 4fef1c31b..b67f0b9ef 100644 --- a/tests/i18n/unicode-description-matching.test +++ b/tests/i18n/unicode-description-matching.test @@ -7,6 +7,6 @@ hledger -f - register desc:аура bank 20 cash >>> -2009/01/01 аура (cyrillic le.. bank 10 10 +2009-01-01 аура (cyrillic le.. bank 10 10 cash -10 0 >>>=0 diff --git a/tests/i18n/unicode-print.test b/tests/i18n/unicode-print.test index bc4fff4a2..b7958693f 100644 --- a/tests/i18n/unicode-print.test +++ b/tests/i18n/unicode-print.test @@ -4,7 +4,7 @@ hledger -f - print счёт:первый 1 счёт:второй >>> -2009/01/01 проверка +2009-01-01 проверка счёт:первый 1 счёт:второй diff --git a/tests/i18n/unicode-register.test b/tests/i18n/unicode-register.test index 38836cee7..17f95441e 100644 --- a/tests/i18n/unicode-register.test +++ b/tests/i18n/unicode-register.test @@ -4,6 +4,6 @@ hledger -f - register τράπεζα 10 руб नकद >>> -2009/01/01 проверка τράπεζα 10 руб 10 руб +2009-01-01 проверка τράπεζα 10 руб 10 руб नकद -10 руб 0 >>>=0 diff --git a/tests/i18n/wide-char-layout.test b/tests/i18n/wide-char-layout.test index 4a2c00cb8..2e17a18c4 100644 --- a/tests/i18n/wide-char-layout.test +++ b/tests/i18n/wide-char-layout.test @@ -19,15 +19,15 @@ hledger -f - print 㐀:㐁:㐂:㐃:㐄 1 㐀 -1 >>> -2000/01/01 transaction 1 +2000-01-01 transaction 1 㐀 㐃㐃1 @ 2 㐂㐂㐂㐂㐂㐂㐂㐂㐂㐂㐂 㐀:㐁 ; 㐃㐃-1 -2000/01/02 transaction 2 +2000-01-02 transaction 2 㐀:㐁:㐂 USD 1 㐀:㐁:㐂:㐃 EUR -1 -2000/01/03 transaction 3 +2000-01-03 transaction 3 㐀:㐁:㐂:㐃:㐄 1 㐀 -1 @@ -37,11 +37,11 @@ hledger -f - print # 2. hledger -f chinese.journal register --width 80 >>> -2000/01/01 transaction 1 㐀 1 A 1 A +2000-01-01 transaction 1 㐀 1 A 1 A 㐀:㐁 -1 A 0 -2000/01/02 transaction 2 㐀:㐁:㐂 1 A 1 A +2000-01-02 transaction 2 㐀:㐁:㐂 1 A 1 A 㐀:㐁:㐂:㐃 -1 A 0 -2000/01/03 transaction 3 㐀:㐁:㐂:㐃:㐄 1 A 1 A +2000-01-03 transaction 3 㐀:㐁:㐂:㐃:㐄 1 A 1 A 㐀 -1 A 0 >>>2 >>>=0 diff --git a/tests/incomestatement.test b/tests/incomestatement.test index 36b8c64cb..907f4a094 100644 --- a/tests/incomestatement.test +++ b/tests/incomestatement.test @@ -243,7 +243,7 @@ Income Statement 2008 # old (arithmetic sign): # Income Statement (Historical Ending Balances) # -# || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 +# || 2008-01-31 2008-02-29 2008-03-31 2008-04-30 2008-05-31 2008-06-30 2008-07-31 2008-08-31 2008-09-30 2008-10-31 2008-11-30 2008-12-31 # ===================++================================================================================================================================================ # Revenues || # -------------------++------------------------------------------------------------------------------------------------------------------------------------------------ @@ -265,7 +265,7 @@ hledger -f sample.journal incomestatement -p 'monthly in 2008' --historical >>> Income Statement 2008/01/31,,2008/12/31 (Historical Ending Balances) - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 + || 2008-01-31 2008-02-29 2008-03-31 2008-04-30 2008-05-31 2008-06-30 2008-07-31 2008-08-31 2008-09-30 2008-10-31 2008-11-30 2008-12-31 ===================++================================================================================================================================================ Revenues || -------------------++------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/tests/journal/amounts-and-commodities.test b/tests/journal/amounts-and-commodities.test index bb8dce941..1ae275d05 100644 --- a/tests/journal/amounts-and-commodities.test +++ b/tests/journal/amounts-and-commodities.test @@ -32,7 +32,7 @@ $ hledger -f- print a 10 "DE 0002 635307" b $ hledger -f- print --explicit -2010/04/05 x +2010-04-05 x a 10 "DE 0002 635307" b -10 "DE 0002 635307" @@ -53,7 +53,7 @@ $ hledger -f- balance Equity:Unbalanced $ hledger -f- print -x -2016/01/01 +2016-01-01 saving-card $-105 snacks 95 EUR @@ $100 Equity:Unbalanced $5 @@ -105,10 +105,10 @@ $ hledger -f- bal -V -N # (a) 1,000 A # #$ hledger -f- print -#2015/01/01 +#2015-01-01 # (a) 1,000.00 A # -#2015/01/01 +#2015-01-01 # (a) 1,000.00 A # #>= @@ -160,6 +160,6 @@ $ hledger -f- print # # $ hledger -f- print # could not balance this transaction (real postings are off by $9,990,000) -# 2000/01/01 +# 2000-01-01 # a $-10,000 # b $10,000,000 \ No newline at end of file diff --git a/tests/journal/auto-postings.test b/tests/journal/auto-postings.test index 609550cac..b0566937f 100644 --- a/tests/journal/auto-postings.test +++ b/tests/journal/auto-postings.test @@ -15,14 +15,14 @@ # 1. print $ hledger print -f- --auto -2016/01/01 paycheck ; modified: +2016-01-01 paycheck ; modified: income:remuneration $-100 (liabilities:tax) $-33 ; income tax, generated-posting: = ^income income:donations $-15 (liabilities:tax) $-5 ; income tax, generated-posting: = ^income assets:bank -2016/01/01 withdraw +2016-01-01 withdraw assets:cash $20 assets:bank @@ -30,12 +30,12 @@ $ hledger print -f- --auto # 2. register $ hledger register -f- --auto -2016/01/01 paycheck income:remuneration $-100 $-100 +2016-01-01 paycheck income:remuneration $-100 $-100 (liabilities:tax) $-33 $-133 income:donations $-15 $-148 (liabilities:tax) $-5 $-153 assets:bank $115 $-38 -2016/01/01 withdraw assets:cash $20 $-18 +2016-01-01 withdraw assets:cash $20 $-18 assets:bank $-20 $-38 >= @@ -63,7 +63,7 @@ $ hledger balance -f- --auto # 4. $ hledger register -f- --auto -2018/01/01 (trigger) 1 1 +2018-01-01 (trigger) 1 1 (target) 10 11 (target) 1 12 >= @@ -80,7 +80,7 @@ $ hledger register -f- --auto # 5. $ hledger print -f- --auto -2018/10/07 * MARKET ; modified: +2018-10-07 * MARKET ; modified: expenses:groceries:food [budget:groceries] $-20 ; generated-posting: = ^expenses:groceries [assets:bank:checking] $20 ; generated-posting: = ^expenses:groceries @@ -99,7 +99,7 @@ $ hledger print -f- --auto # 6. $ hledger -f- print --auto -x -2018/01/01 ; modified: +2018-01-01 ; modified: (assets:billable:client1) 0.50h @ $90 assets:receivable:client1 50.00h @ $90 ; generated-posting: = assets:billable:client1 revenues:client1 $-4500 ; generated-posting: = assets:billable:client1 @@ -117,7 +117,7 @@ $ hledger -f- print --auto -x # 7. $ hledger -f- print --auto -x -2018/01/01 ; modified: +2018-01-01 ; modified: (assets:billable:client1) 0.50h assets:receivable:client1 $50 ; generated-posting: = assets:billable:client1 revenues:client1 $-50 ; generated-posting: = assets:billable:client1 @@ -135,7 +135,7 @@ $ hledger -f- print --auto -x # 8. $ hledger -f- print --auto -x -2018/01/01 ; modified: +2018-01-01 ; modified: (assets:billable:client1) 0.50h @ $90 assets:receivable:client1 0.50 "Client1 Hours" @ $100.00 ; generated-posting: = assets:billable:client1 revenues:client1 $-50.00 ; generated-posting: = assets:billable:client1 @@ -180,7 +180,7 @@ $ hledger print -f- --auto # 10. $ hledger -f- print --auto -2018/01/01 ; modified: +2018-01-01 ; modified: Expenses:Joint:Widgets $100.00 @ £0.50 Expenses:Joint $-100.00 @ £0.50 ; generated-posting: = ^Expenses:Joint Liabilities:Joint:Bob $50.00 @ £0.50 ; generated-posting: = ^Expenses:Joint @@ -202,7 +202,7 @@ $ hledger -f- print --auto # 11. $ hledger -f- print --auto -2018/01/01 ; modified: +2018-01-01 ; modified: Expenses:Joint:Widgets $100.00 @@ £50 Expenses:Joint $-100.00 @@ £50 ; generated-posting: = ^Expenses:Joint Liabilities:Joint:Bob $50.00 @@ £25 ; generated-posting: = ^Expenses:Joint @@ -231,7 +231,7 @@ $ hledger -f- print --auto # 12. $ hledger -f- print --auto -2018/01/01 ; modified: +2018-01-01 ; modified: Expenses:Joint:Widgets $100.00 Expenses:Joint $-100.00 @@ £50 ; generated-posting: = ^Expenses:Joint Liabilities:Joint:Bob $50.00 @@ £25 ; generated-posting: = ^Expenses:Joint @@ -259,11 +259,11 @@ $ hledger -f- print --auto # 13. $ hledger print -f- --auto --forecast -b 2016-01 -e 2016-03 -2016/01/03 withdraw +2016-01-03 withdraw assets:cash $20 assets:bank -2016/02/01 paycheck +2016-02-01 paycheck ; generated-transaction: ~ monthly from 2016-01, modified: income:remuneration $-100 (liabilities:tax) $-33 ; income tax, generated-posting: = ^income @@ -275,11 +275,11 @@ $ hledger print -f- --auto --forecast -b 2016-01 -e 2016-03 # 14. and they don't force --auto on $ hledger print -f- --forecast -b 2016-01 -e 2016-03 -2016/01/03 withdraw +2016-01-03 withdraw assets:cash $20 assets:bank -2016/02/01 paycheck +2016-02-01 paycheck ; generated-transaction: ~ monthly from 2016-01 income:remuneration $-100 income:donations $-15 @@ -299,7 +299,7 @@ $ hledger print -f- --forecast -b 2016-01 -e 2016-03 # 15. $ hledger -f- register --auto -2020/10/07 MARKET ex:groceries:food $20 $20 +2020-10-07 MARKET ex:groceries:food $20 $20 [budget:groceries] $-20 0 [as:bank:checking] $20 $20 assets:bank:checking $-20 0 @@ -316,7 +316,7 @@ $ hledger -f- register --auto # 16. Transaction balancing sees auto postings ? # $ hledger -f- print -x --auto -# 2018/12/18 +# 2018-12-18 # a EUR -10.00 ; :tax20: # taxes EUR -2.00 # b EUR 12.00 diff --git a/tests/journal/balance-assertions.test b/tests/journal/balance-assertions.test index 8e5259189..7bd47c438 100755 --- a/tests/journal/balance-assertions.test +++ b/tests/journal/balance-assertions.test @@ -348,7 +348,7 @@ hledger -f- print 2019/01/01 (a) 1A @ 1B = 1A @ 2B >>> -2019/01/01 +2019-01-01 (a) 1A @ 1B = 1A @ 2B >>>=0 @@ -360,7 +360,7 @@ hledger -f- print --explicit 2019/01/01 (a) = 1A @ 2B >>> -2019/01/01 +2019-01-01 (a) 1A @ 2B = 1A @ 2B >>>=0 @@ -420,7 +420,7 @@ hledger -f- print (a:b) 0 =* Y7 (a:b) 0 ==* Y7 >>> -2019/01/01 +2019-01-01 (a) X1 (a) Y3 (a:b) Y7 diff --git a/tests/journal/comments.test b/tests/journal/comments.test index 9c9161ac1..874ba8b63 100644 --- a/tests/journal/comments.test +++ b/tests/journal/comments.test @@ -23,7 +23,7 @@ hledger -f - print ; trailing file comment, ignored >>> -2009/01/01 x ; transaction same line comment +2009-01-01 x ; transaction same line comment ; transaction new line comment a 1 ; posting 1 same line comment ; posting 1 new line comment @@ -38,7 +38,7 @@ hledger -f - print <<< 2017/1/1 this # and * are not ; the comment >>> -2017/01/01 this # and * are not ; the comment +2017-01-01 this # and * are not ; the comment >>>2 >>>=0 @@ -58,7 +58,7 @@ hledger -f - register b >>> -2010/01/01 x a 1 1 +2010-01-01 x a 1 1 b -1 0 >>>2 >>>=0 diff --git a/tests/journal/dates.test b/tests/journal/dates.test index 32fa904c0..1a1a19fad 100644 --- a/tests/journal/dates.test +++ b/tests/journal/dates.test @@ -22,7 +22,7 @@ hledger -f- print a 1 b >>> -2000/02/29 x +2000-02-29 x a 1 b diff --git a/tests/journal/default-commodity.test b/tests/journal/default-commodity.test index 4a75b394e..1741c7ca6 100644 --- a/tests/journal/default-commodity.test +++ b/tests/journal/default-commodity.test @@ -10,7 +10,7 @@ hledger -f- print a 1000 b >>> -2010/01/01 +2010-01-01 a 1000 b @@ -24,7 +24,7 @@ D £1000.00 a 1000 b >>> -2010/01/01 +2010-01-01 a £1000.00 b @@ -38,7 +38,7 @@ D $1,000 a 1000 b >>> -2010/01/01 +2010-01-01 a $1000,000 b @@ -51,7 +51,7 @@ D $1,000.0 2010/1/1 (a) 1000000 >>> -2010/01/01 +2010-01-01 (a) $1,000,000.0 >>>=0 @@ -66,7 +66,7 @@ D $1,000.0 (a) $1000000.00 (b) 1000000 >>> -2010/01/01 +2010-01-01 (a) $1,000,000.00 (b) $1,000,000.00 @@ -85,7 +85,7 @@ D $1000. (a) €1 >>> -2018/01/01 ; modified: +2018-01-01 ; modified: (a) €1 (b) €2 ; generated-posting: = a diff --git a/tests/journal/directives-account.test b/tests/journal/directives-account.test index 2e7955ec9..4b615cb70 100644 --- a/tests/journal/directives-account.test +++ b/tests/journal/directives-account.test @@ -27,7 +27,7 @@ account b L $ hledger -f - bs -N --flat Balance Sheet 2018/01/01 - || 2018/01/01 + || 2018-01-01 =============++============ Assets || -------------++------------ @@ -48,7 +48,7 @@ Balance Sheet 2018/01/01 $ hledger -f - bs -N Balance Sheet 2018/01/01 - || 2018/01/01 + || 2018-01-01 =============++============ Assets || -------------++------------ diff --git a/tests/journal/include.test b/tests/journal/include.test index 9bda8dac7..6710dea9c 100644 --- a/tests/journal/include.test +++ b/tests/journal/include.test @@ -1,16 +1,16 @@ # 1. nested includes in subdirectories mkdir -p b/c/d ; printf '2010/1/1\n (D) 1\n' >b/c/d/d.journal ; printf '2010/1/1\n (C) 1\n!include d/d.journal\n' >b/c/c.journal ; printf '2010/1/1\n (B) 1\n!include c/c.journal\n' >b/b.journal ; printf '2010/1/1\n (A) 1\n!include b/b.journal\n' >a.journal ; hledger -f a.journal print; rm -rf a.journal b >>> -2010/01/01 +2010-01-01 (A) 1 -2010/01/01 +2010-01-01 (B) 1 -2010/01/01 +2010-01-01 (C) 1 -2010/01/01 +2010-01-01 (D) 1 >>>2 @@ -25,13 +25,13 @@ hledger -f - print include a.timeclock include b.timedot >>> -2016/01/01 +2016-01-01 (x) 1.00 -2016/01/01 * 12:00-16:00 +2016-01-01 * 12:00-16:00 (a:aa) 4.00h -2016/01/01 * +2016-01-01 * (b.bb) 1.00 >>>=0 @@ -41,10 +41,10 @@ include b.timedot <<< include *b.journal >>> -2018/01/01 +2018-01-01 (A) 1 -2018/01/01 +2018-01-01 (B) 1 >>>=0 @@ -66,7 +66,7 @@ include doesnotexist.journal <<< include ~/included.journal >>> -2018/01/01 +2018-01-01 (A) 1 >>>2 diff --git a/tests/journal/parens-in-account-name.test b/tests/journal/parens-in-account-name.test index c5fe878e5..7480123da 100644 --- a/tests/journal/parens-in-account-name.test +++ b/tests/journal/parens-in-account-name.test @@ -5,7 +5,7 @@ hledger -f - print b (b) b -1 c >>> -2009/01/01 x +2009-01-01 x a 2 b (b) b -1 c diff --git a/tests/journal/parse-errors.test b/tests/journal/parse-errors.test index dd6eba24b..05bbf8b22 100644 --- a/tests/journal/parse-errors.test +++ b/tests/journal/parse-errors.test @@ -27,7 +27,7 @@ expecting date separator or digit # But in this case the timedot reader can parse it. $ hledger -f - print > -2018/01/01 * +2018-01-01 * (a) 1.00 >= @@ -51,7 +51,7 @@ $ hledger -f journal:- print # 5. hledger doesn't detect this as an error directly, it parses account name "(a) 1" and # amount 0 here. $ hledger -f - print -x -2018/01/01 +2018-01-01 (a) 1 0 >= diff --git a/tests/journal/precision.test b/tests/journal/precision.test index da735eea8..536ec8165 100644 --- a/tests/journal/precision.test +++ b/tests/journal/precision.test @@ -8,7 +8,7 @@ hledger -f - print A 55.3653 C @ 30.92189512 D A -1712 D >>> -2010/01/01 x +2010-01-01 x A 55.3653 C @ 30.92189512 D A -1712 D @@ -24,7 +24,7 @@ hledger -f - print --explicit a 1C @ $1.0049 a >>> -2010/01/01 +2010-01-01 a 0 a 1C @ $1.0049 a $-1.00 @@ -122,7 +122,7 @@ hledger -f- print --explicit c C 11.00 d D -320.00 >>> -2015/01/01 +2015-01-01 c C 10.00 @ D 15.2381 c C 11.00 @ D 15.2381 d D -320.00 @@ -139,7 +139,7 @@ hledger -f- print --explicit e E 11 f F -320.000 >>> -2015/01/01 +2015-01-01 e E 10.0000 @ F 15.2380952 e E 11.0000 @ F 15.2380952 f F -320.000 diff --git a/tests/journal/scientific.test b/tests/journal/scientific.test index a351808fe..62fbe82b1 100644 --- a/tests/journal/scientific.test +++ b/tests/journal/scientific.test @@ -37,7 +37,7 @@ commodity $1,000.00000000 c $1E+3 d >>> -2018/01/01 +2018-01-01 a $105.00000000 b $3.14159260 c $1,000.00000000 diff --git a/tests/journal/status.test b/tests/journal/status.test index 6b4b74d34..b63ded5e1 100644 --- a/tests/journal/status.test +++ b/tests/journal/status.test @@ -3,15 +3,15 @@ # 1. transactions and postings have status marks which are nothing, ! or * hledger -fstatus.journal print >>> -2017/01/01 unmarked +2017-01-01 unmarked (a) 1 (b) 1 -2017/01/02 ! pending +2017-01-02 ! pending (a) 1 ! (b) 1 -2017/01/03 * cleared +2017-01-03 * cleared (a) 1 * (b) 1 @@ -22,7 +22,7 @@ hledger -f- print desc:% <<< 2017/01/01 % >>> -2017/01/01 % +2017-01-01 % >>>=0 @@ -31,7 +31,7 @@ hledger -f- print desc:% # 3. --cleared matches * only hledger -fstatus.journal print --cleared >>> -2017/01/03 * cleared +2017-01-03 * cleared (a) 1 * (b) 1 @@ -40,7 +40,7 @@ hledger -fstatus.journal print --cleared # 4. --pending matches ! only hledger -fstatus.journal print --pending >>> -2017/01/02 ! pending +2017-01-02 ! pending (a) 1 ! (b) 1 @@ -49,7 +49,7 @@ hledger -fstatus.journal print --pending # 5. --unmarked matches no status mark only hledger -fstatus.journal print --unmarked >>> -2017/01/01 unmarked +2017-01-01 unmarked (a) 1 (b) 1 @@ -58,9 +58,9 @@ hledger -fstatus.journal print --unmarked # 6. these flags can be combined hledger -fstatus.journal register --unmarked --pending >>> -2017/01/01 unmarked (a) 1 1 +2017-01-01 unmarked (a) 1 1 (b) 1 2 -2017/01/02 pending (a) 1 3 +2017-01-02 pending (a) 1 3 (b) 1 4 >>>= 0 @@ -76,7 +76,7 @@ hledger -fstatus.journal balance -N --unmarked # 8. status:* matches * only hledger -fstatus.journal print status:* >>> -2017/01/03 * cleared +2017-01-03 * cleared (a) 1 * (b) 1 @@ -85,7 +85,7 @@ hledger -fstatus.journal print status:* # 9. status:! matches ! only hledger -fstatus.journal print status:! >>> -2017/01/02 ! pending +2017-01-02 ! pending (a) 1 ! (b) 1 @@ -94,7 +94,7 @@ hledger -fstatus.journal print status:! # 10. status: matches unmarked only hledger -fstatus.journal print status: >>> -2017/01/01 unmarked +2017-01-01 unmarked (a) 1 (b) 1 @@ -103,11 +103,11 @@ hledger -fstatus.journal print status: # 11. multiple status: queries are OR'd hledger -fstatus.journal print status: status:! >>> -2017/01/01 unmarked +2017-01-01 unmarked (a) 1 (b) 1 -2017/01/02 ! pending +2017-01-02 ! pending (a) 1 ! (b) 1 diff --git a/tests/journal/transaction-prices.test b/tests/journal/transaction-prices.test index 8970c7734..ba44ebc18 100644 --- a/tests/journal/transaction-prices.test +++ b/tests/journal/transaction-prices.test @@ -6,7 +6,7 @@ hledger -f- print --explicit expenses:foreign currency €100 @ $1.35 assets >>> -2011/01/01 +2011-01-01 expenses:foreign currency €100 @ $1.35 assets $-135.00 @@ -19,7 +19,7 @@ hledger -f- print --explicit --cost expenses:foreign currency €100 @ $1.35 assets >>> -2011/01/01 +2011-01-01 expenses:foreign currency $135.00 assets $-135.00 @@ -32,7 +32,7 @@ hledger -f - print --explicit expenses:foreign currency €100 @@ $135 assets >>> -2011/01/01 +2011-01-01 expenses:foreign currency €100 @@ $135 assets $-135 @@ -50,7 +50,7 @@ hledger -f - print --explicit misc €-1 misc $-2.1 >>> -2011/01/01 +2011-01-01 expenses:foreign currency €100 @ $1.35 misc $2.10 assets $-135.00 @@ -67,7 +67,7 @@ hledger -f - print --explicit c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72 >>> -2002/09/30 * 1a1a6305d06ce4b284dba0d267c23f69d70c20be +2002-09-30 * 1a1a6305d06ce4b284dba0d267c23f69d70c20be c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG @@ $17,783.72 a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72 diff --git a/tests/journal/valuation.test b/tests/journal/valuation.test index a729c6589..d5cdcdeb5 100644 --- a/tests/journal/valuation.test +++ b/tests/journal/valuation.test @@ -100,7 +100,7 @@ P 2000/1/1 $ €1.20 (a) $100 $ hledger -f- reg -V -2000/01/01 (a) €120.00 €120.00 +2000-01-01 (a) €120.00 €120.00 # 8. print -V affects posting amounts but not balance assertions. @@ -110,7 +110,7 @@ P 2000/1/1 $ €1.20 (a) $100 = $100 $ hledger -f- print -V -2000/01/01 +2000-01-01 (a) €120.00 = $100 >=0 @@ -137,23 +137,23 @@ P 2000/04/01 A 4 B # 9. print costs using transaction prices $ hledger -f- print --value=cost -2000/01/01 +2000-01-01 (a) 6 B -2000/02/01 +2000-02-01 (a) 7 B -2000/03/01 +2000-03-01 (a) 8 B >=0 # 10. print value using prices on last day of report period (2000-02-29) $ hledger -f- print --value=end date:2000/01-2000/03 -2000/01/01 +2000-01-01 (a) 2 B -2000/02/01 +2000-02-01 (a) 2 B >=0 @@ -161,26 +161,26 @@ $ hledger -f- print --value=end date:2000/01-2000/03 # 11. print value using prices on last day of report period (no period specified) # specified - uses last day of journal (2000-03-01) $ hledger -f- print --value=end -2000/01/01 +2000-01-01 (a) 3 B -2000/02/01 +2000-02-01 (a) 3 B -2000/03/01 +2000-03-01 (a) 3 B >=0 # 12. print value using prices on a specified date $ hledger -f- print --value=2000-01-15 -2000/01/01 +2000-01-01 (a) 5 B -2000/02/01 +2000-02-01 (a) 5 B -2000/03/01 +2000-03-01 (a) 5 B >=0 @@ -188,13 +188,13 @@ $ hledger -f- print --value=2000-01-15 # 13. print value using prices today # (assuming today's date is >= 2000-04-01) $ hledger -f- print --value=now -2000/01/01 +2000-01-01 (a) 4 B -2000/02/01 +2000-02-01 (a) 4 B -2000/03/01 +2000-03-01 (a) 4 B >=0 @@ -203,53 +203,53 @@ $ hledger -f- print --value=now # 14. register report valued at cost. $ hledger -f- reg --value=cost -2000/01/01 (a) 6 B 6 B -2000/02/01 (a) 7 B 13 B -2000/03/01 (a) 8 B 21 B +2000-01-01 (a) 6 B 6 B +2000-02-01 (a) 7 B 13 B +2000-03-01 (a) 8 B 21 B # 15. register report valued at period end $ hledger -f- reg --value=end -2000/01/01 (a) 3 B 3 B -2000/02/01 (a) 3 B 6 B -2000/03/01 (a) 3 B 9 B +2000-01-01 (a) 3 B 3 B +2000-02-01 (a) 3 B 6 B +2000-03-01 (a) 3 B 9 B # 16. register report valued at specified date $ hledger -f- reg --value=2000-01-15 -2000/01/01 (a) 5 B 5 B -2000/02/01 (a) 5 B 10 B -2000/03/01 (a) 5 B 15 B +2000-01-01 (a) 5 B 5 B +2000-02-01 (a) 5 B 10 B +2000-03-01 (a) 5 B 15 B # 17. register report valued today $ hledger -f- reg --value=now -2000/01/01 (a) 4 B 4 B -2000/02/01 (a) 4 B 8 B -2000/03/01 (a) 4 B 12 B +2000-01-01 (a) 4 B 4 B +2000-02-01 (a) 4 B 8 B +2000-03-01 (a) 4 B 12 B # 18. single-period register report valued at default date (same as --value=now) $ hledger -f- reg -V -2000/01/01 (a) 4 B 4 B -2000/02/01 (a) 4 B 8 B -2000/03/01 (a) 4 B 12 B +2000-01-01 (a) 4 B 4 B +2000-02-01 (a) 4 B 8 B +2000-03-01 (a) 4 B 12 B # register with -H (starting balance) # 19. register with starting balance, valued at cost. $ hledger -f- reg --value=cost -b 200002 -H -2000/02/01 (a) 7 B 13 B -2000/03/01 (a) 8 B 21 B +2000-02-01 (a) 7 B 13 B +2000-03-01 (a) 8 B 21 B # 20. register with starting balance, valued at period end. # That is unspecified so the last posting date is used, ie 2000/3/1, so the price is 3 B. # Starting balance is 5 B as above. $ hledger -f- reg --value=end -b 200002 -H -2000/02/01 (a) 3 B 8 B -2000/03/01 (a) 3 B 11 B +2000-02-01 (a) 3 B 8 B +2000-03-01 (a) 3 B 11 B # 21. register with starting balance, valued at specified date (when the price is 5 B). # Starting balance is 5 B as above. $ hledger -f- reg --value=2000-01-15 -b 200002 -H -2000/02/01 (a) 5 B 10 B -2000/03/01 (a) 5 B 15 B +2000-02-01 (a) 5 B 10 B +2000-03-01 (a) 5 B 15 B # register, periodic @@ -378,7 +378,7 @@ Balance changes in 2000q1, valued at period ends: # 35. multicolumn balance report valued at other date $ hledger -f- bal -MTA --value=2000-01-15 -Balance changes in 2000q1, valued at 2000/01/15: +Balance changes in 2000q1, valued at 2000-01-15: || Jan Feb Mar Total Average ===++================================= @@ -415,7 +415,7 @@ Balance changes in 2000q1, valued at period ends: $ hledger -f- bal -M -H -b 200002 --value=cost Ending balances (historical) in 2000/02/01-2000/03/31, valued at cost: - || 2000/02/29 2000/03/31 + || 2000-02-29 2000-03-31 ===++======================== a || 13 B 21 B ---++------------------------ @@ -428,7 +428,7 @@ Ending balances (historical) in 2000/02/01-2000/03/31, valued at cost: $ hledger -f- bal -MA -H -b 200002 --value=end Ending balances (historical) in 2000/02/01-2000/03/31, valued at period ends: - || 2000/02/29 2000/03/31 Average + || 2000-02-29 2000-03-31 Average ===++================================= a || 4 B 9 B 6 B ---++--------------------------------- @@ -437,9 +437,9 @@ Ending balances (historical) in 2000/02/01-2000/03/31, valued at period ends: # 40. multicolumn balance report with -H valued at other date. # The starting balance is 5 B (1 A valued at 2000/1/15). $ hledger -f- bal -M -H -b 200002 --value=2000-01-15 -Ending balances (historical) in 2000/02/01-2000/03/31, valued at 2000/01/15: +Ending balances (historical) in 2000/02/01-2000/03/31, valued at 2000-01-15: - || 2000/02/29 2000/03/31 + || 2000-02-29 2000-03-31 ===++======================== a || 10 B 15 B ---++------------------------ @@ -459,7 +459,7 @@ P 2000/04/01 A 4 B $ hledger -f- bal -ME -H -p200001-200004 --value=c Ending balances (historical) in 2000q1, valued at cost: - || 2000/01/31 2000/02/29 2000/03/31 + || 2000-01-31 2000-02-29 2000-03-31 ===++==================================== a || 6 B 6 B 6 B ---++------------------------------------ @@ -470,7 +470,7 @@ Ending balances (historical) in 2000q1, valued at cost: $ hledger -f- bal -META -H -p200001-200004 --value=e Ending balances (historical) in 2000q1, valued at period ends: - || 2000/01/31 2000/02/29 2000/03/31 Average + || 2000-01-31 2000-02-29 2000-03-31 Average ===++============================================= a || 5 B 2 B 3 B 3 B ---++--------------------------------------------- @@ -478,9 +478,9 @@ Ending balances (historical) in 2000q1, valued at period ends: # 43. multicolumn balance report with -H, valuing each period's carried-over balances at other date. $ hledger -f- bal -ME -H -p200001-200004 --value=2000-01-15 -Ending balances (historical) in 2000q1, valued at 2000/01/15: +Ending balances (historical) in 2000q1, valued at 2000-01-15: - || 2000/01/31 2000/02/29 2000/03/31 + || 2000-01-31 2000-02-29 2000-03-31 ===++==================================== a || 5 B 5 B 5 B ---++------------------------------------ @@ -540,7 +540,7 @@ Budget performance in 2000q1, valued at period ends: # 47. budget report, valued at other date. $ hledger -f- bal -MTA --budget --value=2000-01-15 -Budget performance in 2000q1, valued at 2000/01/15: +Budget performance in 2000q1, valued at 2000-01-15: || Jan Feb Mar Total Average ===++========================================================================================================== diff --git a/tests/journal/valuation2.test b/tests/journal/valuation2.test index cc92048ad..3637c307f 100644 --- a/tests/journal/valuation2.test +++ b/tests/journal/valuation2.test @@ -17,7 +17,7 @@ comment # 1. normal unvalued output $ hledger -f- print -x -2019/06/01 +2019-06-01 a 1 B b -1 B @@ -25,7 +25,7 @@ $ hledger -f- print -x # 2. current market value in default valuation commodity $ hledger -f- print -x -V -2019/06/01 +2019-06-01 a 10 A b -10 A @@ -33,7 +33,7 @@ $ hledger -f- print -x -V # 3. same as above, but request commodity A explicitly $ hledger -f- print -x --value=now,A -2019/06/01 +2019-06-01 a 10 A b -10 A @@ -41,7 +41,7 @@ $ hledger -f- print -x --value=now,A # 4. request commodity B - no effect $ hledger -f- print -x --value=now,B -2019/06/01 +2019-06-01 a 1 B b -1 B @@ -49,7 +49,7 @@ $ hledger -f- print -x --value=now,B # 5. request commodity we don't have prices for - no effect $ hledger -f- print -x --value=now,Z -2019/06/01 +2019-06-01 a 1 B b -1 B @@ -61,7 +61,7 @@ $ hledger -f- print -x --value=now,Z # And because that makes it display as zero, the commodity symbol # and sign are not shown either. $ hledger -f- print -x --value=now,C -2019/06/01 +2019-06-01 a 0 b 0 @@ -70,7 +70,7 @@ $ hledger -f- print -x --value=now,C # # but the precision is increased to show the decimal digit # # (otherwise it would show C0). # $ hledger -f- print -x --value=now,C -# 2019/06/01 +# 2019-06-01 # a C0.5 # b C-0.5 # @@ -78,7 +78,7 @@ $ hledger -f- print -x --value=now,C # 7. request commodity D - chains B->A, A->D prices $ hledger -f- print -x --value=now,D -2019/06/01 +2019-06-01 a 1000 D b -1000 D @@ -87,7 +87,7 @@ $ hledger -f- print -x --value=now,D # 8. request commodity E - chains B->A, A->D, reverse of D->E prices. # As with C above, E gets the default display style, with precision 0. $ hledger -f- print -x --value=now,E -2019/06/01 +2019-06-01 a E333 b E-333 @@ -95,7 +95,7 @@ $ hledger -f- print -x --value=now,E # # As with C above, E gets the default display style, but with the precision # # increased to show the decimal digits, but no more than 8. # $ hledger -f- print -x --value=now,E -# 2019/06/01 +# 2019-06-01 # a E333.33333333 # b E-333.33333333 # @@ -112,7 +112,7 @@ $ hledger -f- print -x --value=now,E # 9. Normal print output. $ hledger -f- print -2000/01/01 +2000-01-01 a -1A @ 1B b 1B @@ -120,7 +120,7 @@ $ hledger -f- print # 10. Valuing in a commodity with no market price has no effect. $ hledger -f- print -XZ -2000/01/01 +2000-01-01 a -1A @ 1B b 1B @@ -128,7 +128,7 @@ $ hledger -f- print -XZ # 11. -B converts to the transaction price's commodity. $ hledger -f- print -B -2000/01/01 +2000-01-01 a -1B b 1B @@ -137,7 +137,7 @@ $ hledger -f- print -B # 12. Note the -XZ nullifies the -B here, because both are forms of --value # (-B -XZ is equivalent to --value=cost --value=end,Z), and the rightmost wins. $ hledger -f- print -B -XZ -2000/01/01 +2000-01-01 a -1A @ 1B b 1B @@ -153,7 +153,7 @@ P 2000/1/1 A 1B # 13. $ hledger -f- print -2000/01/01 +2000-01-01 a -1A @ 1B b 1B @@ -161,7 +161,7 @@ $ hledger -f- print # 14. $ hledger -f- print -XZ -2000/01/01 +2000-01-01 a -1A @ 1B b 1B @@ -169,7 +169,7 @@ $ hledger -f- print -XZ # 15. $ hledger -f- print -B -2000/01/01 +2000-01-01 a -1B b 1B @@ -177,7 +177,7 @@ $ hledger -f- print -B # 16. $ hledger -f- print -B -XZ -2000/01/01 +2000-01-01 a -1A @ 1B b 1B @@ -193,11 +193,11 @@ P 2002/01/01 A 3 B # 17. -V uses today as the default valuation date, unlike --value=end. $ hledger -f- reg -V -2000/01/01 (a) 3 B 3 B +2000-01-01 (a) 3 B 3 B # 18. -V uses the report end date, if specified, as valuation date. $ hledger -f- reg -V -e 2001 -2000/01/01 (a) 2 B 2 B +2000-01-01 (a) 2 B 2 B # 19. In balance reports too. $ hledger -f- bal -N -V diff --git a/tests/pivot.test b/tests/pivot.test index d659fad4c..47768f203 100644 --- a/tests/pivot.test +++ b/tests/pivot.test @@ -8,7 +8,7 @@ hledger -f- --pivot TAG print Account2 -2 EUR ; TAG: value >>> -2016/02/16 Test Transaction +2016-02-16 Test Transaction 2 EUR value -2 EUR ; TAG: value @@ -50,7 +50,7 @@ hledger -f- --pivot TAG reg '^Account2$' '^fun$' not:hidden Account2 -1 EUR ; TAG: hidden >>> -2016/02/16 Test Transaction fun 2 EUR 2 EUR +2016-02-16 Test Transaction fun 2 EUR 2 EUR value -1 EUR 1 EUR >>>=0 @@ -63,7 +63,7 @@ hledger -f- --pivot expenses reg not:liabilities assets $5 ; expenses:c liabilities $-1605 >>> -2017/01/01 prepay a $1500 $1500 +2017-01-01 prepay a $1500 $1500 b $100 $1600 c $5 $1605 >>>=0 @@ -97,7 +97,7 @@ hledger -f- --pivot code reg ^income assets:bank account 2 EUR income:donations -2 EUR >>> -2016/02/16 Donation Freifunk Freifunk -2 EUR -2 EUR +2016-02-16 Donation Freifunk Freifunk -2 EUR -2 EUR >>>=0 # get expenses balance by description/payee diff --git a/tests/print/date2.test b/tests/print/date2.test index 117b8865e..65b878e73 100644 --- a/tests/print/date2.test +++ b/tests/print/date2.test @@ -8,10 +8,10 @@ hledger -f - print (b) 1 >>> -2000/01/01=2000/03/03 +2000-01-01=2000-03-03 (a) 1 -2000/01/02=2000/02/02 +2000-01-02=2000-02-02 (b) 1 >>>2 @@ -27,10 +27,10 @@ hledger -f - print --date2 (b) 1 >>> -2000/01/02=2000/02/02 +2000-01-02=2000-02-02 (b) 1 -2000/01/01=2000/03/03 +2000-01-01=2000-03-03 (a) 1 >>>2 diff --git a/tests/print/explicit.test b/tests/print/explicit.test index 0d87c9a57..60cacb0da 100644 --- a/tests/print/explicit.test +++ b/tests/print/explicit.test @@ -7,7 +7,7 @@ hledger -f - print expenses $5 assets >>> -2017/01/01 +2017-01-01 expenses $5 assets @@ -21,7 +21,7 @@ hledger -f - print --explicit expenses $5 assets >>> -2017/01/01 +2017-01-01 expenses $5 assets $-5 @@ -35,7 +35,7 @@ hledger -f - print expenses 4 EUR assets $-5 >>> -2017/01/01 +2017-01-01 expenses 4 EUR assets $-5 @@ -49,7 +49,7 @@ hledger -f - print --explicit expenses 4 EUR assets $-5 >>> -2017/01/01 +2017-01-01 expenses 4 EUR @@ $5 assets $-5 @@ -63,7 +63,7 @@ hledger -f - print assets = $100 equity >>> -2017/01/01 +2017-01-01 assets = $100 equity @@ -77,7 +77,7 @@ hledger -f - print --explicit assets = $100 equity >>> -2017/01/01 +2017-01-01 assets $100 = $100 equity $-100 @@ -92,7 +92,7 @@ D 1000.00 EUR expenses 100 assets >>> -2017/01/01 +2017-01-01 expenses 100.00 EUR assets @@ -106,7 +106,7 @@ hledger -f - print --explicit assets $0 equity >>> -2017/01/01 +2017-01-01 assets 0 equity 0 diff --git a/tests/print/long-account-name.test b/tests/print/long-account-name.test index 2d2782e79..0d3e02992 100644 --- a/tests/print/long-account-name.test +++ b/tests/print/long-account-name.test @@ -4,7 +4,7 @@ hledger -f - print aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1 b >>> -2009/01/01 x +2009-01-01 x aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1 b diff --git a/tests/query-desc.test b/tests/query-desc.test index 2b17a1126..b33243cff 100644 --- a/tests/query-desc.test +++ b/tests/query-desc.test @@ -9,7 +9,7 @@ hledger -f - print desc:x b >>> -2009/01/01 x +2009-01-01 x a 1 b diff --git a/tests/query-tag.test b/tests/query-tag.test index 30b181505..2a410fe60 100644 --- a/tests/query-tag.test +++ b/tests/query-tag.test @@ -12,7 +12,7 @@ hledger -f - print ; posting-2-tag-2: ; non-metadata: >>> -2010/01/01 ; txntag1: txn val 1 +2010-01-01 ; txntag1: txn val 1 ; txntag2: txn val 2 a 1 ; posting1tag1: posting 1 val 1 @@ -38,11 +38,11 @@ hledger -f - print tag:foo e 1 f -1 >>> -2010/01/01 ; foo:bar +2010-01-01 ; foo:bar a 1 b -1 -2010/01/02 ; foo:baz +2010-01-02 ; foo:baz c 1 d -1 @@ -65,7 +65,7 @@ hledger -f - print tag:foo=bar e 1 f -1 >>> -2010/01/01 ; foo:bar +2010-01-01 ; foo:bar a 1 b -1 @@ -87,8 +87,8 @@ hledger -f - register tag:foo=bar e 1 f -1 >>> -2010/01/01 a 1 1 -2010/01/03 e 1 2 +2010-01-01 a 1 1 +2010-01-03 e 1 2 f -1 1 >>>2 >>>=0 @@ -113,15 +113,15 @@ hledger -f - print not:tag:. g 4 h -4 >>> -2010/01/01 desc +2010-01-01 desc a 1 b -1 -2010/01/03 +2010-01-03 e 3 f -3 -2010/01/04 (code) +2010-01-04 (code) g 4 h -4 diff --git a/tests/register/average.test b/tests/register/average.test index 711f7844c..ed68f6a64 100644 --- a/tests/register/average.test +++ b/tests/register/average.test @@ -11,8 +11,8 @@ (a) 1 $ hledger -f- register -A -2019/01/01 (a) 1.0 1.0 -2019/01/02 (a) 1.0 1.0 -2019/01/03 (a) 1.0 1.0 -2019/01/04 (a) 1.0 1.0 +2019-01-01 (a) 1.0 1.0 +2019-01-02 (a) 1.0 1.0 +2019-01-03 (a) 1.0 1.0 +2019-01-04 (a) 1.0 1.0 >= diff --git a/tests/register/date2.test b/tests/register/date2.test index dc61c37fd..19ca00ba7 100644 --- a/tests/register/date2.test +++ b/tests/register/date2.test @@ -12,7 +12,7 @@ hledger -f - register --date2 a 1 b >>> -2010/01/01 x a 1 1 +2010-01-01 x a 1 1 b -1 0 >>>=0 @@ -25,7 +25,7 @@ hledger -f- register -p 2014/1/2 --date2 2014/1/3 (b) 1 >>> -2014/01/02 (a) 1 1 +2014-01-02 (a) 1 1 >>>=0 # 3. --date2 causes date: to match the secondary date @@ -37,7 +37,7 @@ hledger -f- register date:2014/1/2 --date2 2014/1/3 (b) 1 >>> -2014/01/02 (a) 1 1 +2014-01-02 (a) 1 1 >>>=0 # 4. date2: matches the secondary date (but does not necessarily display it) @@ -49,7 +49,7 @@ hledger -f- register date2:2014/1/2 2014/1/3 (b) 1 >>> -2014/01/01 (a) 1 1 +2014-01-01 (a) 1 1 >>>=0 # 5. date2: plus --date2 both matches and displays the secondary date @@ -61,7 +61,7 @@ hledger -f- register date2:2014/1/2 --date2 2014/1/3 (b) 1 >>> -2014/01/02 (a) 1 1 +2014-01-02 (a) 1 1 >>>=0 # 6. date2: matching is not affected by --date2 @@ -84,6 +84,6 @@ hledger -f- register --date2 2014/1/3=2/1 (b) 1 >>> -2014/02/01 (b) 1 1 -2014/02/02 (a) 1 2 +2014-02-01 (b) 1 1 +2014-02-02 (a) 1 2 >>>=0 diff --git a/tests/register/depth.test b/tests/register/depth.test index 365461d16..fabf3a059 100644 --- a/tests/register/depth.test +++ b/tests/register/depth.test @@ -5,7 +5,7 @@ hledger -f - register aa --depth 1 a:aa:aaa 1 b >>> -2010/01/01 x a 1 1 +2010-01-01 x a 1 1 >>>=0 # 2. separate postings remain separate @@ -23,9 +23,9 @@ hledger -f - register aa --depth 2 a:aa 1 b:bb:bbb >>> -2010/01/01 x a:aa 1 1 -2010/01/01 y a:aa 1 2 -2010/01/02 z a:aa 1 3 +2010-01-01 x a:aa 1 1 +2010-01-01 y a:aa 1 2 +2010-01-02 z a:aa 1 3 >>>=0 # 3. with a reporting interval, all postings are aggregated under each (clipped) account @@ -53,7 +53,7 @@ hledger -f - register a --depth 1 --cleared 2012/1/1 * (a:aa) 1 >>> -2012/01/01 (a) 1 1 +2012-01-01 (a) 1 1 >>>2 >>>=0 diff --git a/tests/register/unordered-dates.test b/tests/register/unordered-dates.test index d788761fc..549d6aafb 100644 --- a/tests/register/unordered-dates.test +++ b/tests/register/unordered-dates.test @@ -10,6 +10,6 @@ hledger -f- register date:2014/4 (a) 1 >>> -2014/04/01 (a) 1 1 +2014-04-01 (a) 1 1 >>>2 >>>= 0 diff --git a/tests/rewrite.test b/tests/rewrite.test index 39b698d8c..e858cb619 100644 --- a/tests/rewrite.test +++ b/tests/rewrite.test @@ -10,14 +10,14 @@ hledger rewrite -f- ^income --add-posting '(liabilities:tax) *.33 ; income tax assets:cash $20 assets:bank >>> -2016/01/01 paycheck ; modified: +2016-01-01 paycheck ; modified: income:remuneration $-100 (liabilities:tax) $-33 ; income tax, generated-posting: = ^income income:donations $-15 (liabilities:tax) $-5 ; income tax, generated-posting: = ^income assets:bank -2016/01/01 withdraw +2016-01-01 withdraw assets:cash $20 assets:bank @@ -36,14 +36,14 @@ hledger rewrite -f- expenses:gifts --add-posting '(budget:gifts) *-1' assets:cash $-15 expenses:gifts ; [1/2] >>> -2016/01/01 withdraw +2016-01-01 withdraw assets:cash $20 assets:bank -2016/01/01 gift ; modified: +2016-01-01 gift ; modified: assets:cash $-15 expenses:gifts ; [1/2] - (budget:gifts) $-15 ; [2016/01/02], generated-posting: = expenses:gifts + (budget:gifts) $-15 ; [2016-01-02], generated-posting: = expenses:gifts >>>2 >>>=0 @@ -67,15 +67,15 @@ hledger rewrite -f- = ^assets:unbilled:client2 (assets:to bill:client2) *150.00 CAD >>> -2017/04/24 * 09:00-09:25 ; modified: +2017-04-24 * 09:00-09:25 ; modified: (assets:unbilled:client1) 0.42h (assets:to bill:client1) 42.00 CAD ; generated-posting: = ^assets:unbilled:client1 -2017/04/25 * 10:00-11:15 ; modified: +2017-04-25 * 10:00-11:15 ; modified: (assets:unbilled:client1) 1.25h (assets:to bill:client1) 125.00 CAD ; generated-posting: = ^assets:unbilled:client1 -2017/04/25 * 14:00-15:32 ; modified: +2017-04-25 * 14:00-15:32 ; modified: (assets:unbilled:client2) 1.54h (assets:to bill:client2) 231.00 CAD ; generated-posting: = ^assets:unbilled:client2 @@ -104,17 +104,17 @@ hledger rewrite -f- -B assets:to bill:client2 *1.00 hours @ $150.00 income:consulting:client2 >>> -2017/04/24 * 09:00-09:25 ; modified: +2017-04-24 * 09:00-09:25 ; modified: (assets:unbilled:client1) 0.42h assets:to bill:client1 $42.00 ; generated-posting: = ^assets:unbilled:client1 income:consulting:client1 ; generated-posting: = ^assets:unbilled:client1 -2017/04/25 * 10:00-11:15 ; modified: +2017-04-25 * 10:00-11:15 ; modified: (assets:unbilled:client1) 1.25h assets:to bill:client1 $125.00 ; generated-posting: = ^assets:unbilled:client1 income:consulting:client1 ; generated-posting: = ^assets:unbilled:client1 -2017/04/25 * 14:00-15:32 ; modified: +2017-04-25 * 14:00-15:32 ; modified: (assets:unbilled:client2) 1.54h assets:to bill:client2 $231.00 ; generated-posting: = ^assets:unbilled:client2 income:consulting:client2 ; generated-posting: = ^assets:unbilled:client2 @@ -139,13 +139,13 @@ hledger rewrite -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee $5' - # income:remuneration $-100 # assets:bank >>> -2016/01/01 withdraw ; modified: +2016-01-01 withdraw ; modified: assets:cash $20 assets:bank expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0" -2016/01/02 withdraw ; modified: +2016-01-02 withdraw ; modified: assets:cash assets:bank $-30 expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" @@ -188,12 +188,12 @@ hledger rewrite -f- date:2017/1 --add-posting 'Here comes Santa $0' = ^expenses not:housing not:grocery not:food (budget:misc) *-1 >>> -2016/12/31 ; modified: +2016-12-31 ; modified: expenses:housing $600.00 (budget:housing) $-600.00 ; generated-posting: = ^expenses:housing assets:cash -2017/01/01 ; modified: +2017-01-01 ; modified: expenses:food $20.00 (budget:food) $-20.00 ; generated-posting: = ^expenses:grocery ^expenses:food Here comes Santa 0 ; generated-posting: = date:2017/1 @@ -206,7 +206,7 @@ hledger rewrite -f- date:2017/1 --add-posting 'Here comes Santa $0' assets:cash Here comes Santa 0 ; generated-posting: = date:2017/1 -2017/01/02 ; modified: +2017-01-02 ; modified: assets:cash $200.00 Here comes Santa 0 ; generated-posting: = date:2017/1 assets:bank @@ -215,7 +215,7 @@ hledger rewrite -f- date:2017/1 --add-posting 'Here comes Santa $0' (budget:misc) $-1.60 ; generated-posting: = ^expenses not:housing not:grocery not:food Here comes Santa 0 ; generated-posting: = date:2017/1 -2017/02/01 +2017-02-01 assets:cash $100.00 assets:bank @@ -237,14 +237,14 @@ hledger rewrite --diff -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee +++ - @@ -1,3 +1,5 @@ -2016/01/01 withdraw -+2016/01/01 withdraw ; modified: ++2016-01-01 withdraw ; modified: assets:cash $20 assets:bank + expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" + assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0" @@ -5,3 +7,5 @@ -2016/01/02 withdraw -+2016/01/02 withdraw ; modified: ++2016-01-02 withdraw ; modified: assets:cash assets:bank $-30 + expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" diff --git a/tests/roi.test b/tests/roi.test index db1eaa79a..9b9c7242f 100644 --- a/tests/roi.test +++ b/tests/roi.test @@ -12,7 +12,7 @@ hledger -f- roi --inv investment --pnl pnl -b 2017 -e 2018 -Y +---++------------+------------++---------------+----------+-------------+-----++-------+-------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++=======+=======+ -| 1 || 2017/01/01 | 2017/12/31 || 0 | 200 | 200 | 0 || 0.00% | 0.00% | +| 1 || 2017-01-01 | 2017-12-31 || 0 | 200 | 200 | 0 || 0.00% | 0.00% | +---++------------+------------++---------------+----------+-------------+-----++-------+-------+ >>>=0 @@ -31,7 +31,7 @@ hledger -f- roi --inv investment --pnl pnl -b 2017 -e 2018 -Y +---++------------+------------++---------------+----------+-------------+-----++--------+--------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++========+========+ -| 1 || 2017/01/01 | 2017/12/31 || 0 | 100 | 112 | 12 || 12.00% | 12.00% | +| 1 || 2017-01-01 | 2017-12-31 || 0 | 100 | 112 | 12 || 12.00% | 12.00% | +---++------------+------------++---------------+----------+-------------+-----++--------+--------+ >>>=0 @@ -95,7 +95,7 @@ hledger -f- roi --inv investment --pnl pnl -b 2017 -e 2018 -Y +---++------------+------------++---------------+----------+-------------+-----++--------+--------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++========+========+ -| 1 || 2017/01/01 | 2017/12/31 || 0 | 100 | 112 | 12 || 12.00% | 12.00% | +| 1 || 2017-01-01 | 2017-12-31 || 0 | 100 | 112 | 12 || 12.00% | 12.00% | +---++------------+------------++---------------+----------+-------------+-----++--------+--------+ >>>=0 @@ -118,7 +118,7 @@ hledger -f- roi --inv investment --pnl pnl -b 2017 -e 2018 -Y +---++------------+------------++---------------+----------+-------------+-----++--------+--------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++========+========+ -| 1 || 2017/01/01 | 2017/12/31 || 0 | 200 | 220 | 20 || 12.72% | 10.00% | +| 1 || 2017-01-01 | 2017-12-31 || 0 | 200 | 220 | 20 || 12.72% | 10.00% | +---++------------+------------++---------------+----------+-------------+-----++--------+--------+ >>>=0 @@ -141,7 +141,7 @@ hledger -f- roi --inv investment --pnl pnl -b 2017 -e 2018 -Y +---++------------+------------++---------------+----------+-------------+------++---------+---------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+======++=========+=========+ -| 1 || 2017/01/01 | 2017/12/31 || 0 | 200 | 20 | -180 || -95.73% | -90.00% | +| 1 || 2017-01-01 | 2017-12-31 || 0 | 200 | 20 | -180 || -95.73% | -90.00% | +---++------------+------------++---------------+----------+-------------+------++---------+---------+ >>>=0 @@ -172,10 +172,10 @@ hledger -f- roi --inv investment --pnl pnl -b 2017 -e 2018 -Q +---++------------+------------++---------------+----------+-------------+-----++---------+---------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++=========+=========+ -| 1 || 2017/01/01 | 2017/03/31 || 0 | 100 | 100 | 0 || 0.00% | 0.00% | -| 2 || 2017/04/01 | 2017/06/30 || 100 | 0 | 110 | 10 || 46.56% | 46.56% | -| 3 || 2017/07/01 | 2017/09/30 || 110 | 100 | 210 | 0 || 0.00% | 0.00% | -| 4 || 2017/10/01 | 2017/12/31 || 210 | -50 | 155 | -5 || -11.83% | -11.82% | +| 1 || 2017-01-01 | 2017-03-31 || 0 | 100 | 100 | 0 || 0.00% | 0.00% | +| 2 || 2017-04-01 | 2017-06-30 || 100 | 0 | 110 | 10 || 46.56% | 46.56% | +| 3 || 2017-07-01 | 2017-09-30 || 110 | 100 | 210 | 0 || 0.00% | 0.00% | +| 4 || 2017-10-01 | 2017-12-31 || 210 | -50 | 155 | -5 || -11.83% | -11.82% | +---++------------+------------++---------------+----------+-------------+-----++---------+---------+ >>>=0 @@ -206,7 +206,7 @@ hledger -f- roi --inv investment --pnl pnl -b 2017-06 -e 2018 +---++------------+------------++---------------+----------+-------------+-----++-------+--------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++=======+========+ -| 1 || 2017/06/01 | 2017/12/31 || 100 | 50 | 155 | 5 || 5.24% | 11.45% | +| 1 || 2017-06-01 | 2017-12-31 || 100 | 50 | 155 | 5 || 5.24% | 11.45% | +---++------------+------------++---------------+----------+-------------+-----++-------+--------+ >>>=0 @@ -221,7 +221,7 @@ hledger -f- roi -p 2019-11 +---++------------+------------++---------------+----------+-------------+-----++-------+-------+ | || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | +===++============+============++===============+==========+=============+=====++=======+=======+ -| 1 || 2019/11/01 | 2019/11/30 || 0 | 0 | 0 | 0 || 0.00% | 0.00% | +| 1 || 2019-11-01 | 2019-11-30 || 0 | 0 | 0 | 0 || 0.00% | 0.00% | +---++------------+------------++---------------+----------+-------------+-----++-------+-------+ >>>=0 diff --git a/tests/timeclock.test b/tests/timeclock.test index 6bb719ba4..7306e93ad 100644 --- a/tests/timeclock.test +++ b/tests/timeclock.test @@ -9,13 +9,13 @@ o 2009/1/2 09:00:00 i 2009/1/3 08:00:00 some:account name and a description o 2009/1/3 09:00:00 >>> -2009/01/01 * 08:00-09:00 +2009-01-01 * 08:00-09:00 () 1.00h -2009/01/02 * 08:00-09:00 +2009-01-02 * 08:00-09:00 (account name) 1.00h -2009/01/03 * and a description +2009-01-03 * and a description (some:account name) 1.00h >>>2 @@ -46,25 +46,25 @@ o 2009/1/3 09:00:00 #i 2017/04/22 09:00:00 C #o 2017/04/22 17:00:00 #>>> -#2017/04/20 * 09:00-17:00 +#2017-04-20 * 09:00-17:00 # (A) 8.00h # -#2017/04/21 * 09:00-23:59 +#2017-04-21 * 09:00-23:59 # (B) 15.00h # -#2017/04/22 * 00:00-09:00 +#2017-04-22 * 00:00-09:00 # (B) 9.00h # -#2017/04/22 * 17:00-23:59 +#2017-04-22 * 17:00-23:59 # () 7.00h # -#2017/04/23 * 00:00-23:59 +#2017-04-23 * 00:00-23:59 # () 24.00h # -#2017/04/24 * 00:00-23:59 +#2017-04-24 * 00:00-23:59 # () 24.00h # -#2017/04/25 * 00:00-11:28 +#2017-04-25 * 00:00-11:28 # () 11.47h # #>>>2