From 5d6c6d778e3e336d4456c180a67acde5613f8091 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 12 Dec 2009 03:03:41 +0000 Subject: [PATCH] there shouldn't be brackets in transaction's effective date, my mistake --- Ledger/LedgerTransaction.hs | 2 +- Ledger/Parse.hs | 3 +-- tests/effective-balance.test | 2 +- tests/effective-day.test | 2 +- tests/effective-print-2.test | 4 ++-- tests/effective-print.test | 2 +- tests/effective-register.test | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Ledger/LedgerTransaction.hs b/Ledger/LedgerTransaction.hs index ec859f86a..e79c95304 100644 --- a/Ledger/LedgerTransaction.hs +++ b/Ledger/LedgerTransaction.hs @@ -70,7 +70,7 @@ showLedgerTransaction' elide effective t = code = if (length $ ltcode t) > 0 then (printf " (%s)" $ ltcode t) else "" desc = " " ++ ltdescription t showdate = printf "%-10s" . showDate - showedate = printf "[=%s]" . showdate + showedate = printf "=%s" . showdate showpostings ps | elide && length ps > 1 && isLedgerTransactionBalanced t = map showposting (init ps) ++ [showpostingnoamt (last ps)] diff --git a/Ledger/Parse.hs b/Ledger/Parse.hs index abf9304c2..eb06338ca 100644 --- a/Ledger/Parse.hs +++ b/Ledger/Parse.hs @@ -356,9 +356,8 @@ ledgerdatetime = do ledgereffectivedate :: GenParser Char LedgerFileCtx (Maybe Day) ledgereffectivedate = do - string "[=" + char '=' edate <- ledgerdate - char ']' return $ Just edate ledgerstatus :: GenParser Char st Bool diff --git a/tests/effective-balance.test b/tests/effective-balance.test index 4c0496900..6ab895182 100644 --- a/tests/effective-balance.test +++ b/tests/effective-balance.test @@ -4,7 +4,7 @@ a 1 b -2009/1/1[=2010/1/1] x +2009/1/1=2010/1/1 x a 10 b >>> diff --git a/tests/effective-day.test b/tests/effective-day.test index 0325e5f9e..7f7cf5529 100644 --- a/tests/effective-day.test +++ b/tests/effective-day.test @@ -3,7 +3,7 @@ <<< Y 2009 -2009/1/1[=1/2] x +2009/1/1=1/2 x a 1 b >>> diff --git a/tests/effective-print-2.test b/tests/effective-print-2.test index 238b1f64a..dc20741e3 100644 --- a/tests/effective-print-2.test +++ b/tests/effective-print-2.test @@ -1,10 +1,10 @@ -f - print <<< -2009/1/1[=2010/1/1] x +2009/1/1=2010/1/1 x a 1 b >>> -2009/01/01[=2010/01/01] x +2009/01/01=2010/01/01 x a 1 b -1 diff --git a/tests/effective-print.test b/tests/effective-print.test index 0585f81cd..891d9b35b 100644 --- a/tests/effective-print.test +++ b/tests/effective-print.test @@ -1,6 +1,6 @@ -f - print --effective <<< -2009/1/1[=2010/1/1] x +2009/1/1=2010/1/1 x a 1 b >>> diff --git a/tests/effective-register.test b/tests/effective-register.test index f25a2a033..a339e8c9c 100644 --- a/tests/effective-register.test +++ b/tests/effective-register.test @@ -1,6 +1,6 @@ -f - register --effective <<< -2009/1/1[=2010/1/1] x +2009/1/1=2010/1/1 x a 1 b >>>