Merge branch 'date_formatting'

This commit is contained in:
Simon Michael 2020-01-07 16:18:47 -08:00
commit 41f00e42f9
60 changed files with 490 additions and 490 deletions

View File

@ -115,7 +115,7 @@ instance Show DateSpan where
-- show s = "DateSpan \"" ++ showDateSpan s ++ "\"" -- quotes to help pretty-show -- show s = "DateSpan \"" ++ showDateSpan s ++ "\"" -- quotes to help pretty-show
showDate :: Day -> String showDate :: Day -> String
showDate = formatTime defaultTimeLocale "%0C%y/%m/%d" showDate = show
-- | Render a datespan as a display string, abbreviating into a -- | Render a datespan as a display string, abbreviating into a
-- compact form if possible. -- compact form if possible.

View File

@ -154,16 +154,16 @@ isStandardPeriod = isStandardPeriod' . simplifyPeriod
-- | Render a period as a compact display string suitable for user output. -- | Render a period as a compact display string suitable for user output.
-- --
-- >>> showPeriod (WeekPeriod (fromGregorian 2016 7 25)) -- >>> showPeriod (WeekPeriod (fromGregorian 2016 7 25))
-- "2016/07/25w30" -- "2016-07-25w30"
showPeriod (DayPeriod b) = formatTime defaultTimeLocale "%0C%y/%m/%d" b -- DATE showPeriod (DayPeriod b) = formatTime defaultTimeLocale "%F" b -- DATE
showPeriod (WeekPeriod b) = formatTime defaultTimeLocale "%0C%y/%m/%dw%V" b -- STARTDATEwYEARWEEK showPeriod (WeekPeriod b) = formatTime defaultTimeLocale "%Fw%V" b -- STARTDATEwYEARWEEK
showPeriod (MonthPeriod y m) = printf "%04d/%02d" y m -- YYYY/MM showPeriod (MonthPeriod y m) = printf "%04d/%02d" y m -- YYYY/MM
showPeriod (QuarterPeriod y q) = printf "%04dq%d" y q -- YYYYqN showPeriod (QuarterPeriod y q) = printf "%04dq%d" y q -- YYYYqN
showPeriod (YearPeriod y) = printf "%04d" y -- YYYY showPeriod (YearPeriod y) = printf "%04d" y -- YYYY
showPeriod (PeriodBetween b e) = formatTime defaultTimeLocale "%0C%y/%m/%d" b showPeriod (PeriodBetween b e) = formatTime defaultTimeLocale "%F" b
++ formatTime defaultTimeLocale "-%0C%y/%m/%d" (addDays (-1) e) -- STARTDATE-INCLUSIVEENDDATE ++ formatTime defaultTimeLocale "-%F" (addDays (-1) e) -- STARTDATE-INCLUSIVEENDDATE
showPeriod (PeriodFrom b) = formatTime defaultTimeLocale "%0C%y/%m/%d-" b -- STARTDATE- showPeriod (PeriodFrom b) = formatTime defaultTimeLocale "%F-" b -- STARTDATE-
showPeriod (PeriodTo e) = formatTime defaultTimeLocale "-%0C%y/%m/%d" (addDays (-1) e) -- -INCLUSIVEENDDATE showPeriod (PeriodTo e) = formatTime defaultTimeLocale "-%F" (addDays (-1) e) -- -INCLUSIVEENDDATE
showPeriod PeriodAll = "-" showPeriod PeriodAll = "-"
-- | Like showPeriod, but if it's a month period show just -- | Like showPeriod, but if it's a month period show just

View File

@ -638,7 +638,7 @@ tests_Transaction =
Right nulltransaction{tpostings = ["a" `post` usd (-5), "b" `post` (eur 3 @@ usd 4), "c" `post` usd 1]} Right nulltransaction{tpostings = ["a" `post` usd (-5), "b" `post` (eur 3 @@ usd 4), "c" `post` usd 1]}
, tests "showTransaction" [ , tests "showTransaction" [
test "null transaction" $ showTransaction nulltransaction @?= "0000/01/01\n\n" test "null transaction" $ showTransaction nulltransaction @?= "0000-01-01\n\n"
, test "non-null transaction" $ showTransaction , test "non-null transaction" $ showTransaction
nulltransaction nulltransaction
{ tdate = parsedate "2012/05/14" { tdate = parsedate "2012/05/14"
@ -660,7 +660,7 @@ tests_Transaction =
] ]
} @?= } @?=
unlines unlines
[ "2012/05/14=2012/05/15 (code) desc ; tcomment1" [ "2012-05-14=2012-05-15 (code) desc ; tcomment1"
, " ; tcomment2" , " ; tcomment2"
, " * a $1.00" , " * a $1.00"
, " ; pcomment2" , " ; pcomment2"
@ -686,7 +686,7 @@ tests_Transaction =
] ]
in showTransaction t) @?= in showTransaction t) @?=
(unlines (unlines
[ "2007/01/28 coopportunity" [ "2007-01-28 coopportunity"
, " expenses:food:groceries $47.18" , " expenses:food:groceries $47.18"
, " assets:checking $-47.18" , " assets:checking $-47.18"
, "" , ""
@ -709,7 +709,7 @@ tests_Transaction =
, posting {paccount = "assets:checking", pamount = Mixed [usd (-47.19)]} , posting {paccount = "assets:checking", pamount = Mixed [usd (-47.19)]}
])) @?= ])) @?=
(unlines (unlines
[ "2007/01/28 coopportunity" [ "2007-01-28 coopportunity"
, " expenses:food:groceries $47.18" , " expenses:food:groceries $47.18"
, " assets:checking $-47.19" , " assets:checking $-47.19"
, "" , ""
@ -729,7 +729,7 @@ tests_Transaction =
"" ""
[] []
[posting {paccount = "expenses:food:groceries", pamount = missingmixedamt}])) @?= [posting {paccount = "expenses:food:groceries", pamount = missingmixedamt}])) @?=
(unlines ["2007/01/28 coopportunity", " expenses:food:groceries", ""]) (unlines ["2007-01-28 coopportunity", " expenses:food:groceries", ""])
, test "show a transaction with a priced commodityless amount" $ , test "show a transaction with a priced commodityless amount" $
(showTransaction (showTransaction
(txnTieKnot $ (txnTieKnot $
@ -747,7 +747,7 @@ tests_Transaction =
[ posting {paccount = "a", pamount = Mixed [num 1 `at` (usd 2 `withPrecision` 0)]} [ posting {paccount = "a", pamount = Mixed [num 1 `at` (usd 2 `withPrecision` 0)]}
, posting {paccount = "b", pamount = missingmixedamt} , posting {paccount = "b", pamount = missingmixedamt}
])) @?= ])) @?=
(unlines ["2010/01/01 x", " a 1 @ $2", " b", ""]) (unlines ["2010-01-01 x", " a 1 @ $2", " b", ""])
] ]
, tests "balanceTransaction" [ , tests "balanceTransaction" [
test "detect unbalanced entry, sign error" $ test "detect unbalanced entry, sign error" $

View File

@ -30,7 +30,7 @@ import Data.Maybe
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import Data.Time.Calendar (Day) import Data.Time.Calendar (Day)
import Data.Time.Format (formatTime, defaultTimeLocale) import Data.Time.Format (formatTime, defaultTimeLocale, iso8601DateFormat)
import Data.Typeable (Typeable) import Data.Typeable (Typeable)
import Safe (headDef, headMay, atMay) import Safe (headDef, headMay, atMay)
import System.Console.CmdArgs.Explicit import System.Console.CmdArgs.Explicit
@ -164,7 +164,8 @@ confirmedTransactionWizard prevInput es@EntryState{..} stack@(currentStage : _)
{ esArgs = drop 1 esArgs { esArgs = drop 1 esArgs
, esDefDate = date , esDefDate = date
} }
dateAndCodeString = formatTime defaultTimeLocale "%Y/%m/%d" date ++ (if T.null code then "" else " (" ++ T.unpack code ++ ")") dateAndCodeString = formatTime defaultTimeLocale yyyymmddFormat date ++ (if T.null code then "" else " (" ++ T.unpack code ++ ")")
yyyymmddFormat = iso8601DateFormat Nothing
confirmedTransactionWizard prevInput{prevDateAndCode=Just dateAndCodeString} es' (EnterDescAndComment (date, code) : stack) confirmedTransactionWizard prevInput{prevDateAndCode=Just dateAndCodeString} es' (EnterDescAndComment (date, code) : stack)
Nothing -> Nothing ->
confirmedTransactionWizard prevInput es stack confirmedTransactionWizard prevInput es stack

View File

@ -200,7 +200,7 @@ tests_Register = tests "Register" [
(postingsReportAsText defcliopts $ postingsReport opts (queryFromOpts (parsedate "2008/11/26") opts) j) (postingsReportAsText defcliopts $ postingsReport opts (queryFromOpts (parsedate "2008/11/26") opts) j)
@?= @?=
unlines unlines
["2009/01/01 медвежья шкура расходы:покупки 100 100" ["2009-01-01 медвежья шкура расходы:покупки 100 100"
," актив:наличные -100 0"] ," актив:наличные -100 0"]
] ]

View File

@ -18,7 +18,6 @@ import Data.Maybe
import qualified Data.Text as TS import qualified Data.Text as TS
import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy as TL
import Data.Time.Calendar import Data.Time.Calendar
import Data.Time.Format
import System.Console.CmdArgs.Explicit as C import System.Console.CmdArgs.Explicit as C
import Hledger.Read.CsvReader (CSV, printCSV) import Hledger.Read.CsvReader (CSV, printCSV)
import Lucid as L hiding (value_) import Lucid as L hiding (value_)
@ -250,7 +249,7 @@ showEndDates es = case es of
[e] -> showdate e [e] -> showdate e
[] -> "" [] -> ""
where where
showdate = formatTime defaultTimeLocale "%0C%y/%m/%d" showdate = show
-- | Run one subreport for a compound balance command in multi-column mode. -- | Run one subreport for a compound balance command in multi-column mode.
-- This returns a MultiBalanceReport. -- This returns a MultiBalanceReport.

View File

@ -61,12 +61,12 @@ alias /A (.)/=\1
c c
$ hledger -f- print $ hledger -f- print
2011/01/01 2011-01-01
b b 1 b b 1
b b 2 b b 2
c c
2011/01/01 2011-01-01
b 1 b 1
b 2 b 2
c c
@ -85,7 +85,7 @@ $ hledger -f- print
c c
$ hledger -f- print --alias '/A (.)/=a' --alias /a/=b $ hledger -f- print --alias '/A (.)/=a' --alias /a/=b
2011/01/01 2011-01-01
b 1 b 1
b 2 b 2
c c
@ -104,7 +104,7 @@ alias E=F
[x:a:x] [x:a:x]
$ hledger -f- print --alias /a/=A --alias /B/=C --alias /B/=D --alias /C/=D $ hledger -f- print --alias /a/=A --alias /B/=C --alias /B/=D --alias /C/=D
2011/01/01 2011-01-01
[E:x] 1 [E:x] 1
[x:A:x] [x:A:x]
@ -144,7 +144,7 @@ alias a = b
a 1 a 1
b -1 b -1
$ hledger -f- reg '^a$' '^b$' $ hledger -f- reg '^a$' '^b$'
2017/01/01 b 1 1 2017-01-01 b 1 1
b -1 0 b -1 0
# recursive aliases https://github.com/simonmichael/hledger/issues/1055 # recursive aliases https://github.com/simonmichael/hledger/issues/1055
@ -155,7 +155,7 @@ $ hledger -f- reg '^a$' '^b$'
(one) 1 (one) 1
$ hledger -f- --alias "one=two" --alias "two=three" print $ hledger -f- --alias "one=two" --alias "two=three" print
2000/01/01 2000-01-01
(three) 1 (three) 1
>=0 >=0
@ -169,7 +169,7 @@ alias one = two
(one) 1 (one) 1
$ hledger -f- print $ hledger -f- print
2000/01/01 2000-01-01
(three) 1 (three) 1
>=0 >=0
@ -182,7 +182,7 @@ alias one = two
(one) 1 (one) 1
$ hledger -f- print $ hledger -f- print
2000/01/01 2000-01-01
(two) 1 (two) 1
>=0 >=0
@ -193,7 +193,7 @@ $ hledger -f- print
(one) 1 (one) 1
$ hledger -f- --alias "/one/=two" --alias "/two/=three" print $ hledger -f- --alias "/one/=two" --alias "/two/=three" print
2000/01/01 2000-01-01
(three) 1 (three) 1
>=0 >=0
@ -207,7 +207,7 @@ alias /one/ = two
(one) 1 (one) 1
$ hledger -f- print $ hledger -f- print
2000/01/01 2000-01-01
(three) 1 (three) 1
>=0 >=0
@ -220,7 +220,7 @@ alias /one/ = two
(one) 1 (one) 1
$ hledger -f- print $ hledger -f- print
2000/01/01 2000-01-01
(two) 1 (two) 1
>=0 >=0

View File

@ -7,7 +7,7 @@ hledger -f - print --explicit
b USD 1 ; a dollar b USD 1 ; a dollar
c ; a euro and a dollar c ; a euro and a dollar
>>> >>>
2010/01/01 2010-01-01
a EUR 1 ; a euro a EUR 1 ; a euro
b USD 1 ; a dollar b USD 1 ; a dollar
c EUR -1 ; a euro and a dollar c EUR -1 ; a euro and a dollar
@ -23,7 +23,7 @@ hledger -f - register
b USD 1 ; a dollar b USD 1 ; a dollar
c ; a euro and 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 b USD 1 EUR 1
USD 1 USD 1
c EUR -1 c EUR -1
@ -53,7 +53,7 @@ hledger -f- print --explicit --empty
a $0.00 @ 3EUR a $0.00 @ 3EUR
b b
>>> >>>
2010/03/01 x 2010-03-01 x
a 0 @ 3EUR a 0 @ 3EUR
b 0 b 0
@ -93,14 +93,14 @@ D 1000,00€
# b USD 1 ; a dollar # b USD 1 ; a dollar
# c ; a euro and a dollar # c ; a euro and a dollar
# >>> # >>>
# 2010/01/01 # 2010-01-01
# a EUR 1 @ USD 1.1 ; a euro # a EUR 1 @ USD 1.1 ; a euro
# b USD 1 ; a dollar # b USD 1 ; a dollar
# EUR -1 @ USD 1.1 # EUR -1 @ USD 1.1
# c USD -1 ; a euro and a dollar # c USD -1 ; a euro and a dollar
# #
## ##
# 2010/01/01 # 2010-01-01
# a EUR 1 @ USD 1.1 ; a euro # a EUR 1 @ USD 1.1 ; a euro
# b USD 1.0 ; a dollar # b USD 1.0 ; a dollar
# c USD -2.1 ; a euro and a dollar # c USD -2.1 ; a euro and a dollar
@ -115,7 +115,7 @@ D 1000,00€
# b USD 1 ; a dollar # b USD 1 ; a dollar
# c ; a euro and 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 # EUR 1
# b USD 1.0 USD 1.0 # b USD 1.0 USD 1.0
# EUR 1 # EUR 1

View File

@ -4,7 +4,7 @@ hledger -f balance-multicol.journal bal -MEH --no-total date:2013/1 --tree --fla
>>> >>>
Ending balances (historical) in 2013/01: Ending balances (historical) in 2013/01:
|| 2013/01/31 || 2013-01-31
=================++============ =================++============
assets:checking || 10 assets:checking || 10
>>>= 0 >>>= 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: Ending balances (historical) in 2013/01:
|| 2013/01/31 || 2013-01-31
============++============ ============++============
assets || 10 assets || 10
checking || 10 checking || 10

View File

@ -36,9 +36,9 @@
assets:cash assets:cash
$ hledger -f- bal --budget -DTN $ hledger -f- bal --budget -DTN
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 Total || 2016-12-01 2016-12-02 2016-12-03 Total
==================++======================================================================================== ==================++========================================================================================
assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] $-75 [ 100% of $-75] assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] $-75 [ 100% of $-75]
assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] $-75 [ 100% of $-75] assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] $-75 [ 100% of $-75]
@ -82,9 +82,9 @@ account expenses:leisure
assets:cash assets:cash
$ hledger -f- bal --budget -DTN $ hledger -f- bal --budget -DTN
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 Total || 2016-12-01 2016-12-02 2016-12-03 Total
==================++======================================================================================== ==================++========================================================================================
expenses || $10 [ 40% of $25] $14 [ 56% of $25] $51 [ 204% of $25] $75 [ 100% of $75] expenses || $10 [ 40% of $25] $14 [ 56% of $25] $51 [ 204% of $25] $75 [ 100% of $75]
expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15] $5 [ 11% of $45] expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15] $5 [ 11% of $45]
@ -94,9 +94,9 @@ Budget performance in 2016/12/01-2016/12/03:
# # 2. -E # # 2. -E
# $ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget -E # $ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget -E
# Budget performance in 2016/12/01-2016/12/03: # Budget performance in 2016-12-01-2016-12-03:
# || 2016/12/01 2016/12/02 2016/12/03 # || 2016-12-01 2016-12-02 2016-12-03
# ==============================++============================================================================== # ==============================++==============================================================================
# <unbudgeted>:expenses:cab || 0 0 $15 # <unbudgeted>:expenses:cab || 0 0 $15
# <unbudgeted>:expenses:movies || 0 0 $25 # <unbudgeted>:expenses:movies || 0 0 $25
@ -142,9 +142,9 @@ Budget performance in 2016/12/01-2016/12/03:
# assets:cash # assets:cash
# $ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget # $ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
# Budget performance in 2016/12/01-2016/12/03: # Budget performance in 2016-12-01-2016-12-03:
# || 2016/12/01 2016/12/02 2016/12/03 # || 2016-12-01 2016-12-02 2016-12-03
# ==================++===================================================================================== # ==================++=====================================================================================
# <unbudgeted> || 0 0 $40 # <unbudgeted> || 0 0 $40
# assets:cash || $-15 [ 60% of $-25] $-26 [ 104% of $-25] $-51 [ 204% of $-25] # assets:cash || $-15 [ 60% of $-25] $-26 [ 104% of $-25] $-51 [ 204% of $-25]
@ -156,9 +156,9 @@ Budget performance in 2016/12/01-2016/12/03:
#** Sort by actual amount, flat mode. #** Sort by actual amount, flat mode.
$ hledger -f- bal --budget -DTNS $ hledger -f- bal --budget -DTNS
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 Total || 2016-12-01 2016-12-02 2016-12-03 Total
==================++======================================================================================== ==================++========================================================================================
expenses || $10 [ 40% of $25] $14 [ 56% of $25] $51 [ 204% of $25] $75 [ 100% of $75] expenses || $10 [ 40% of $25] $14 [ 56% of $25] $51 [ 204% of $25] $75 [ 100% of $75]
expenses:food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10] $30 [ 100% of $30] expenses:food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10] $30 [ 100% of $30]
@ -169,9 +169,9 @@ Budget performance in 2016/12/01-2016/12/03:
#** Sort by actual amount, tree mode. #** Sort by actual amount, tree mode.
$ hledger -f- bal --budget -DTNS --tree $ hledger -f- bal --budget -DTNS --tree
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 Total || 2016-12-01 2016-12-02 2016-12-03 Total
===========++======================================================================================== ===========++========================================================================================
expenses || $10 [ 40% of $25] $14 [ 56% of $25] $51 [ 204% of $25] $75 [ 100% of $75] expenses || $10 [ 40% of $25] $14 [ 56% of $25] $51 [ 204% of $25] $75 [ 100% of $75]
food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10] $30 [ 100% of $30] food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10] $30 [ 100% of $30]

View File

@ -32,9 +32,9 @@
# 1. Test --budget switch # 1. Test --budget switch
$ hledger -f- bal -D -b 2016-12-01 -e 2016-12-04 --budget $ hledger -f- bal -D -b 2016-12-01 -e 2016-12-04 --budget
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016-12-01 2016-12-02 2016-12-03
==================++================================================================== ==================++==================================================================
assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
@ -46,9 +46,9 @@ Budget performance in 2016/12/01-2016/12/03:
# 2. -E # 2. -E
$ hledger -f- bal -D -b 2016-12-01 -e 2016-12-04 --budget -E $ hledger -f- bal -D -b 2016-12-01 -e 2016-12-04 --budget -E
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016-12-01 2016-12-02 2016-12-03
==================++================================================================== ==================++==================================================================
assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
@ -96,9 +96,9 @@ Budget performance in 2016/12/01-2016/12/03:
assets:cash assets:cash
$ hledger -f- bal -D -b 2016-12-01 -e 2016-12-04 --budget $ hledger -f- bal -D -b 2016-12-01 -e 2016-12-04 --budget
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016-12-01 2016-12-02 2016-12-03
==================++====================================================================================== ==================++======================================================================================
assets || $-15 [ 60% of $-25] $-26 [ 104% of $-25] $-51 [ 204% of $-25] assets || $-15 [ 60% of $-25] $-26 [ 104% of $-25] $-51 [ 204% of $-25]
assets:cash || $-15 [ 60% of $-25] $-26 [ 104% of $-25] $-51 [ 204% of $-25] assets:cash || $-15 [ 60% of $-25] $-26 [ 104% of $-25] $-51 [ 204% of $-25]
@ -131,9 +131,9 @@ Budget performance in 2016/12/01-2016/12/03:
(c) 1 (c) 1
$ hledger -f- bal --budget $ hledger -f- bal --budget
Budget performance in 2018/01/01-2018/01/03: Budget performance in 2018-01-01-2018-01-03:
|| 2018/01/01-2018/01/03 || 2018-01-01-2018-01-03
===++======================= ===++=======================
a || 2 [ 7% of 30] a || 2 [ 7% of 30]
b || 2 [ 2% of 100] b || 2 [ 2% of 100]
@ -145,9 +145,9 @@ Budget performance in 2018/01/01-2018/01/03:
# Budget goals with lower frequency than the report are posted in the # Budget goals with lower frequency than the report are posted in the
# appropriate intermittent periods. # appropriate intermittent periods.
$ hledger -f- bal --budget -D $ hledger -f- bal --budget -D
Budget performance in 2018/01/01-2018/01/03: Budget performance in 2018-01-01-2018-01-03:
|| 2018/01/01 2018/01/02 2018/01/03 || 2018-01-01 2018-01-02 2018-01-03
===++========================================================= ===++=========================================================
a || 1 [ 10% of 10] 0 [ 0% of 10] 1 [ 10% of 10] a || 1 [ 10% of 10] 0 [ 0% of 10] 1 [ 10% of 10]
b || 1 [ 1% of 100] 0 [ 0] 1 [ 0] b || 1 [ 1% of 100] 0 [ 0] 1 [ 0]
@ -157,9 +157,9 @@ Budget performance in 2018/01/01-2018/01/03:
# 6. Budget goals with higher frequency than the report get added up appropriately. # 6. Budget goals with higher frequency than the report get added up appropriately.
$ hledger -f- bal --budget -W $ hledger -f- bal --budget -W
Budget performance in 2018/01/01w01: Budget performance in 2018-01-01w01:
|| 2018/01/01w01 || 2018-01-01w01
===++=================== ===++===================
a || 2 [ 7% of 30] a || 2 [ 7% of 30]
b || 2 [ 2% of 100] b || 2 [ 2% of 100]
@ -189,9 +189,9 @@ Budget performance in 2018/01/01w01:
(b) 1 (b) 1
$ hledger -f- bal --budget -D $ hledger -f- bal --budget -D
Budget performance in 2018/01/01-2018/01/04: Budget performance in 2018-01-01-2018-01-04:
|| 2018/01/01 2018/01/02 2018/01/03 2018/01/04 || 2018-01-01 2018-01-02 2018-01-03 2018-01-04
==============++================================================================ ==============++================================================================
<unbudgeted> || 1 1 1 1 <unbudgeted> || 1 1 1 1
a || 1 1 [ 100% of 1] 1 [ 100% of 1] 1 a || 1 1 [ 100% of 1] 1 [ 100% of 1] 1
@ -219,9 +219,9 @@ Budget performance in 2018/01/01-2018/01/04:
(a) 1 (a) 1
$ hledger -f- bal --budget -D $ hledger -f- bal --budget -D
Budget performance in 2018/01/01-2018/01/04: Budget performance in 2018-01-01-2018-01-04:
|| 2018/01/01 2018/01/02 2018/01/03 2018/01/04 || 2018-01-01 2018-01-02 2018-01-03 2018-01-04
===++==================================================================== ===++====================================================================
a || 1 [ 100% of 1] 1 [ 100% of 1] 1 [ 10% of 10] 1 [ 10% of 10] a || 1 [ 100% of 1] 1 [ 100% of 1] 1 [ 10% of 10] 1 [ 10% of 10]
---++-------------------------------------------------------------------- ---++--------------------------------------------------------------------
@ -229,9 +229,9 @@ Budget performance in 2018/01/01-2018/01/04:
# 9. A "from A to B" budget should not be included in a report beginning on B. # 9. A "from A to B" budget should not be included in a report beginning on B.
$ hledger -f- bal --budget -D -b 2018/1/3 $ hledger -f- bal --budget -D -b 2018/1/3
Budget performance in 2018/01/03-2018/01/04: Budget performance in 2018-01-03-2018-01-04:
|| 2018/01/03 2018/01/04 || 2018-01-03 2018-01-04
===++================================== ===++==================================
a || 1 [ 10% of 10] 1 [ 10% of 10] a || 1 [ 10% of 10] 1 [ 10% of 10]
---++---------------------------------- ---++----------------------------------
@ -251,9 +251,9 @@ Budget performance in 2018/01/03-2018/01/04:
# even if there are no actual transactions in the period, # even if there are no actual transactions in the period,
# or if the actual amount is zero. # or if the actual amount is zero.
$ hledger -f- bal --budget -D date:2018/1/1-2018/1/3 $ hledger -f- bal --budget -D date:2018/1/1-2018/1/3
Budget performance in 2018/01/01-2018/01/02: Budget performance in 2018-01-01-2018-01-02:
|| 2018/01/01 2018/01/02 || 2018-01-01 2018-01-02
===++================================ ===++================================
a || 0 [ 0% of 1] 0 [ 0% of 1] a || 0 [ 0% of 1] 0 [ 0% of 1]
---++-------------------------------- ---++--------------------------------
@ -261,9 +261,9 @@ Budget performance in 2018/01/01-2018/01/02:
# 11. With -E, zeroes are shown # 11. With -E, zeroes are shown
$ hledger -f- bal --budget -D date:2018/1/1-2018/1/3 -E $ hledger -f- bal --budget -D date:2018/1/1-2018/1/3 -E
Budget performance in 2018/01/01-2018/01/02: Budget performance in 2018-01-01-2018-01-02:
|| 2018/01/01 2018/01/02 || 2018-01-01 2018-01-02
===++================================ ===++================================
a || 0 [ 0% of 1] 0 [ 0% of 1] a || 0 [ 0% of 1] 0 [ 0% of 1]
---++-------------------------------- ---++--------------------------------
@ -278,9 +278,9 @@ Budget performance in 2018/01/01-2018/01/02:
(a:b) 1 (a:b) 1
$ hledger -f- bal --budget -N $ hledger -f- bal --budget -N
Budget performance in 2018/01/01: Budget performance in 2018-01-01:
|| 2018/01/01 || 2018-01-01
===++================ ===++================
a || 1 [ 100% of 1] a || 1 [ 100% of 1]
@ -295,9 +295,9 @@ Budget performance in 2018/01/01:
(a:b:c) 1 (a:b:c) 1
$ hledger -f- bal --budget $ hledger -f- bal --budget
Budget performance in 2018/01/01: Budget performance in 2018-01-01:
|| 2018/01/01 || 2018-01-01
=======++================== =======++==================
a || 2 [ 2% of 101] a || 2 [ 2% of 101]
a:b || 1 [ 100% of 1] a:b || 1 [ 100% of 1]
@ -307,9 +307,9 @@ Budget performance in 2018/01/01:
# 14. tree mode # 14. tree mode
$ hledger -f- bal --budget --tree $ hledger -f- bal --budget --tree
Budget performance in 2018/01/01: Budget performance in 2018-01-01:
|| 2018/01/01 || 2018-01-01
=======++================== =======++==================
a || 2 [ 2% of 101] a || 2 [ 2% of 101]
b || 1 [ 100% of 1] b || 1 [ 100% of 1]
@ -338,7 +338,7 @@ P 2018/01/26 SHARE €10
assets:bank assets:bank
$ hledger -f - bal -M --budget --cumulative --forecast -V $ hledger -f - bal -M --budget --cumulative --forecast -V
Budget performance in 2018/05/01-2018/06/30, valued at period ends: Budget performance in 2018-05-01-2018-06-30, valued at period ends:
|| May Jun || May Jun
================++========================================== ================++==========================================
@ -368,9 +368,9 @@ Budget performance in 2018/05/01-2018/06/30, valued at period ends:
liabilities $-30.00 liabilities $-30.00
$ hledger -f- bal --budget $ hledger -f- bal --budget
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
===================++============================== ===================++==============================
expenses || $50.00 [ 5% of $1,000.00] expenses || $50.00 [ 5% of $1,000.00]
expenses:personal || $50.00 [ 5% of $1,000.00] expenses:personal || $50.00 [ 5% of $1,000.00]
@ -380,9 +380,9 @@ Budget performance in 2019/01/01-2019/01/03:
# 17. # 17.
$ hledger -f- bal --budget -E $ hledger -f- bal --budget -E
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
========================================++============================== ========================================++==============================
expenses || $50.00 [ 5% of $1,000.00] expenses || $50.00 [ 5% of $1,000.00]
expenses:personal || $50.00 [ 5% of $1,000.00] expenses:personal || $50.00 [ 5% of $1,000.00]
@ -394,9 +394,9 @@ Budget performance in 2019/01/01-2019/01/03:
# 18. # 18.
$ hledger -f- bal --budget --tree $ hledger -f- bal --budget --tree
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
=============++============================== =============++==============================
expenses || $50.00 [ 5% of $1,000.00] expenses || $50.00 [ 5% of $1,000.00]
personal || $50.00 [ 5% of $1,000.00] personal || $50.00 [ 5% of $1,000.00]
@ -406,9 +406,9 @@ Budget performance in 2019/01/01-2019/01/03:
# 19. # 19.
$ hledger -f- bal --budget --tree -E $ hledger -f- bal --budget --tree -E
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
=================++============================== =================++==============================
expenses || $50.00 [ 5% of $1,000.00] expenses || $50.00 [ 5% of $1,000.00]
personal || $50.00 [ 5% of $1,000.00] personal || $50.00 [ 5% of $1,000.00]
@ -438,9 +438,9 @@ Budget performance in 2019/01/01-2019/01/03:
liabilities $-30.00 liabilities $-30.00
$ hledger -f- bal --budget $ hledger -f- bal --budget
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
===============================++============================== ===============================++==============================
expenses || $50.00 [ 5% of $1100.00] expenses || $50.00 [ 5% of $1100.00]
expenses:personal || $50.00 [ 5% of $1100.00] expenses:personal || $50.00 [ 5% of $1100.00]
@ -451,9 +451,9 @@ Budget performance in 2019/01/01-2019/01/03:
# 21. # 21.
$ hledger -f- bal --budget -E $ hledger -f- bal --budget -E
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
========================================++============================== ========================================++==============================
expenses || $50.00 [ 5% of $1100.00] expenses || $50.00 [ 5% of $1100.00]
expenses:personal || $50.00 [ 5% of $1100.00] expenses:personal || $50.00 [ 5% of $1100.00]
@ -465,9 +465,9 @@ Budget performance in 2019/01/01-2019/01/03:
# 22. # 22.
$ hledger -f- bal --budget --tree $ hledger -f- bal --budget --tree
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
=================++============================== =================++==============================
expenses || $50.00 [ 5% of $1100.00] expenses || $50.00 [ 5% of $1100.00]
personal || $50.00 [ 5% of $1100.00] personal || $50.00 [ 5% of $1100.00]
@ -478,9 +478,9 @@ Budget performance in 2019/01/01-2019/01/03:
# 23. # 23.
$ hledger -f- bal --budget --tree -E $ hledger -f- bal --budget --tree -E
Budget performance in 2019/01/01-2019/01/03: Budget performance in 2019-01-01-2019-01-03:
|| 2019/01/01-2019/01/03 || 2019-01-01-2019-01-03
=================++============================== =================++==============================
expenses || $50.00 [ 5% of $1100.00] expenses || $50.00 [ 5% of $1100.00]
personal || $50.00 [ 5% of $1100.00] personal || $50.00 [ 5% of $1100.00]
@ -515,9 +515,9 @@ Budget performance in 2019/01/01-2019/01/03:
# By default it hides d (because no budget) and e (because zero posted amount). # By default it hides d (because no budget) and e (because zero posted amount).
# f is shown though its budget is zero, it probably shouldn't be. # f is shown though its budget is zero, it probably shouldn't be.
$ hledger bal -f- --budget $ hledger bal -f- --budget
Budget performance in 2019/01/01-2019/01/02: Budget performance in 2019-01-01-2019-01-02:
|| 2019/01/01-2019/01/02 || 2019-01-01-2019-01-02
==================++======================= ==================++=======================
expenses || $80 [ 22% of $370] expenses || $80 [ 22% of $370]
expenses:bills || $80 [ 22% of $370] expenses:bills || $80 [ 22% of $370]
@ -532,9 +532,9 @@ Budget performance in 2019/01/01-2019/01/02:
# 25. -E shows d # 25. -E shows d
$ hledger bal -f- --budget -E $ hledger bal -f- --budget -E
Budget performance in 2019/01/01-2019/01/02: Budget performance in 2019-01-01-2019-01-02:
|| 2019/01/01-2019/01/02 || 2019-01-01-2019-01-02
==================++======================= ==================++=======================
expenses || $80 [ 22% of $370] expenses || $80 [ 22% of $370]
expenses:bills || $80 [ 22% of $370] expenses:bills || $80 [ 22% of $370]

View File

@ -3,12 +3,12 @@
# 1. Here are the postings used in most tests below: # 1. Here are the postings used in most tests below:
hledger -f balance-multicol.journal register hledger -f balance-multicol.journal register
>>> >>>
2012/12/31 (assets:checking) 10 10 2012-12-31 (assets:checking) 10 10
2013/01/01 (assets:checking) 1 11 2013-01-01 (assets:checking) 1 11
2013/01/15 (assets:checking) -1 10 2013-01-15 (assets:checking) -1 10
2013/02/01 (assets:cash) 1 11 2013-02-01 (assets:cash) 1 11
2013/02/02 (assets) 1 12 2013-02-02 (assets) 1 12
2013/03/01 (assets:checking) 1 13 2013-03-01 (assets:checking) 1 13
>>>=0 >>>=0
# 2. A period balance (flow) report. --no-total also works but isn't pretty. # 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: 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 || 0 1 1
assets:cash || 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: 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 || 0 1 1
assets:checking || 0 0 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: 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 || 0 1 1
assets:cash || 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: 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:cash || 0 1 1
assets:checking || 0 0 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: 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 || 0 1 1
assets:cash || 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: 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 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: 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 assets || 10 12 13
--------++------------------------------------ --------++------------------------------------
@ -197,7 +197,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative --
>>> >>>
Ending balances (cumulative) in 2013q1: 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 assets || 0 2 3
cash || 0 1 1 cash || 0 1 1
@ -211,7 +211,7 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical --
>>> >>>
Ending balances (historical) in 2013q1: 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 assets || 10 12 13
cash || 0 1 1 cash || 0 1 1
@ -253,7 +253,7 @@ hledger -f- balance -p 'monthly 2014/1/10-2014/2/20'
(after) 1 (after) 1
>>> >>>
Balance changes in 2014/01/01-2014/02/28: Balance changes in 2014-01-01-2014-02-28:
|| Jan Feb || Jan Feb
========++========== ========++==========

View File

@ -12,9 +12,9 @@ hledger -f sample.journal balance expenses -%
# 2. Multi column percent # 2. Multi column percent
hledger -f sample.journal balance expenses -% -p daily hledger -f sample.journal balance expenses -% -p daily
>>> >>>
Balance changes in 2008/06/03: Balance changes in 2008-06-03:
|| 2008/06/03 || 2008-06-03
===================++============ ===================++============
expenses:food || 50.0 % expenses:food || 50.0 %
expenses:supplies || 50.0 % expenses:supplies || 50.0 %

View File

@ -1,6 +1,6 @@
hledger -f balance-multicol.journal balance --pretty-tables -M hledger -f balance-multicol.journal balance --pretty-tables -M
>>> >>>
Balance changes in 2012/12/01-2013/03/31: Balance changes in 2012-12-01-2013-03-31:
║ Dec Jan Feb Mar ║ Dec Jan Feb Mar
═════════════════╬════════════════════ ═════════════════╬════════════════════

View File

@ -1,6 +1,6 @@
hledger -f balance-multicol.journal balance -M -A --transpose hledger -f balance-multicol.journal balance -M -A --transpose
>>> >>>
Balance changes in 2012/12/01-2013/03/31: Balance changes in 2012-12-01-2013-03-31:
|| assets assets:cash assets:checking | || assets assets:cash assets:checking |
=========++======================================+==== =========++======================================+====
@ -53,9 +53,9 @@ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
expenses:leisure $15 expenses:leisure $15
assets:cash assets:cash
>>> >>>
Budget performance in 2016/12/01-2016/12/03: Budget performance in 2016-12-01-2016-12-03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016-12-01 2016-12-02 2016-12-03
==================++================================================================== ==================++==================================================================
assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]

View File

@ -5,9 +5,9 @@ hledger -f - balancesheet
assets 1 assets 1
b b
>>> >>>
Balance Sheet 2016/01/01 Balance Sheet 2016-01-01
|| 2016/01/01 || 2016-01-01
=============++============ =============++============
Assets || Assets ||
-------------++------------ -------------++------------
@ -48,9 +48,9 @@ Balance Sheet 2016/01/01
# #
hledger -f sample.journal balancesheet -p 'monthly in 2008' hledger -f sample.journal balancesheet -p 'monthly in 2008'
>>> >>>
Balance Sheet 2008/01/31,,2008/12/31 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 || Assets ||
----------------------++------------------------------------------------------------------------------------------------------------------------------------------------ ----------------------++------------------------------------------------------------------------------------------------------------------------------------------------
@ -94,9 +94,9 @@ Balance Sheet 2008/01/31,,2008/12/31
# #
hledger -f sample.journal balancesheet -p 'monthly in 2008' --tree hledger -f sample.journal balancesheet -p 'monthly in 2008' --tree
>>> >>>
Balance Sheet 2008/01/31,,2008/12/31 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 || Assets ||
--------------++------------------------------------------------------------------------------------------------------------------------------------------------ --------------++------------------------------------------------------------------------------------------------------------------------------------------------
@ -123,9 +123,9 @@ Balance Sheet 2008/01/31,,2008/12/31
# by default (shows ending balances). # by default (shows ending balances).
hledger -f sample.journal balancesheet -p 'monthly in 2008' -NAT hledger -f sample.journal balancesheet -p 'monthly in 2008' -NAT
>>> >>>
Balance Sheet 2008/01/31,,2008/12/31 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 || Assets ||
----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------
@ -148,9 +148,9 @@ hledger -f- balancesheet
2017/1/1 2017/1/1
(assets:b) 1 (assets:b) 1
>>> >>>
Balance Sheet 2017/01/01 Balance Sheet 2017-01-01
|| 2017/01/01 || 2017-01-01
=============++============ =============++============
Assets || Assets ||
-------------++------------ -------------++------------
@ -174,9 +174,9 @@ hledger -f- balancesheet --flat
2017/1/1 2017/1/1
(assets:b) 1 (assets:b) 1
>>> >>>
Balance Sheet 2017/01/01 Balance Sheet 2017-01-01
|| 2017/01/01 || 2017-01-01
=============++============ =============++============
Assets || Assets ||
-------------++------------ -------------++------------
@ -199,9 +199,9 @@ hledger -f- balancesheet -YA
2017/1/1 2017/1/1
(assets) $1 (assets) $1
>>> >>>
Balance Sheet 2017/12/31 Balance Sheet 2017-12-31
|| 2017/12/31 Average || 2017-12-31 Average
=============++===================== =============++=====================
Assets || Assets ||
-------------++--------------------- -------------++---------------------
@ -225,9 +225,9 @@ hledger -f - balancesheet -M --pretty-tables
assets 1 assets 1
b b
>>> >>>
Balance Sheet 2016/01/31 Balance Sheet 2016-01-31
║ 2016/01/31 ║ 2016-01-31
═════════════╬════════════ ═════════════╬════════════
Assets ║ Assets ║
─────────────╫──────────── ─────────────╫────────────
@ -262,9 +262,9 @@ hledger -f - balancesheet
assets:this account should not disappear:subaccount -$10 assets:this account should not disappear:subaccount -$10
assets:this account should not disappear assets:this account should not disappear
>>> >>>
Balance Sheet 2018/10/03 Balance Sheet 2018-10-03
|| 2018/10/03 || 2018-10-03
=====================================++============ =====================================++============
Assets || Assets ||
-------------------------------------++------------ -------------------------------------++------------

View File

@ -5,9 +5,9 @@ hledger -f - cashflow
assets 1 assets 1
b b
>>> >>>
Cashflow Statement 2016/01/01 Cashflow Statement 2016-01-01
|| 2016/01/01 || 2016-01-01
============++============ ============++============
Cash flows || Cash flows ||
------------++------------ ------------++------------
@ -75,9 +75,9 @@ hledger -f - cashflow -b 2015 -e 2017
assets:checking $10.00 assets:checking $10.00
assets:receivables -$10.00 assets:receivables -$10.00
>>> >>>
Cashflow Statement 2015/01/01-2016/12/31 Cashflow Statement 2015-01-01-2016-12-31
|| 2015/01/01-2016/12/31 || 2015-01-01-2016-12-31
=================++======================= =================++=======================
Cash flows || Cash flows ||
-----------------++----------------------- -----------------++-----------------------
@ -175,9 +175,9 @@ Cashflow Statement 2008
# 7. Multicolumn test (historical) # 7. Multicolumn test (historical)
hledger -f sample.journal cashflow -p 'monthly in 2008' -A --historical hledger -f sample.journal cashflow -p 'monthly in 2008' -A --historical
>>> >>>
Cashflow Statement 2008/01/31,,2008/12/31 (Historical Ending Balances) 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 || Cash flows ||
----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------
@ -229,9 +229,9 @@ hledger -f - cashflow
assets:fixed assets:equipment 1 assets:fixed assets:equipment 1
b b
>>> >>>
Cashflow Statement 2016/01/01 Cashflow Statement 2016-01-01
|| 2016/01/01 || 2016-01-01
============++============ ============++============
Cash flows || Cash flows ||
------------++------------ ------------++------------

View File

@ -13,52 +13,52 @@
# If this one fails, we got a wrong regex and the inverted regex tests below # If this one fails, we got a wrong regex and the inverted regex tests below
# are also wrong. # are also wrong.
$ hledger -f- register $ hledger -f- register
> /2019\/01\/01/ > /2019-01-01/
# Show only February # Show only February
$ hledger -f- register -p 2019-02 $ hledger -f- register -p 2019-02
> !/2019\/01\/01/ > !/2019-01-01/
# The last -b overrides the first -b # The last -b overrides the first -b
# -> show only February # -> show only February
$ hledger -f- register -b 2019 -b 2019-02 $ hledger -f- register -b 2019 -b 2019-02
> !/2019\/01\/01/ > !/2019-01-01/
# The last -e overrides the first -e # The last -e overrides the first -e
# Note that -e means: include posting/txns BEFORE this date. # Note that -e means: include posting/txns BEFORE this date.
# -> show only January # -> show only January
$ hledger -f- register -e 2020 -e 2019-02-01 $ hledger -f- register -e 2020 -e 2019-02-01
> !/2019\/02\/01/ > !/2019-02-01/
# -p's begin overrides -b because it comes last # -p's begin overrides -b because it comes last
# -> show only February # -> show only February
$ hledger -f- register -b 2019-01-01 -p 2019-02 $ hledger -f- register -b 2019-01-01 -p 2019-02
> !/2019\/01\/01/ > !/2019-01-01/
# -e overrides -p's end because it come last # -e overrides -p's end because it come last
# -> show only first part of January # -> show only first part of January
$ hledger -f- register -p 2019 -e 2019-01-20 $ hledger -f- register -p 2019 -e 2019-01-20
> !/2019\/02\/01/ > !/2019-02-01/
# Date options and queries are AND'ed and produce the intersection independent # Date options and queries are AND'ed and produce the intersection independent
# of their order # of their order
$ hledger -f- register date:2019-02 -p 2019 $ hledger -f- register date:2019-02 -p 2019
> !/2019\/01\/01/ > !/2019-01-01/
$ hledger -f- register -p 2019 date:2019-02 $ hledger -f- register -p 2019 date:2019-02
> !/2019\/01\/01/ > !/2019-01-01/
# Date queries are AND'ed and produce the intersection independent of their # Date queries are AND'ed and produce the intersection independent of their
# order # order
$ hledger -f- register date:2019 date:2019-02 $ hledger -f- register date:2019 date:2019-02
> !/2019\/01\/01/ > !/2019-01-01/
$ hledger -f- register date:2019-02 date:2019 $ hledger -f- register date:2019-02 date:2019
> !/2019\/01\/01/ > !/2019-01-01/
$ hledger -f- register date:2019-02 date:2019-01-01- $ hledger -f- register date:2019-02 date:2019-01-01-
> !/2019\/01\/01/ > !/2019-01-01/
## Date options override date queries ## Date options override date queries
#$ hledger -f- register date:2019-02 -p 2019 #$ hledger -f- register date:2019-02 -p 2019
#> /2019\/01\/01/ #> /2019-01-01/
# Smart dates https://github.com/simonmichael/hledger/issues/1079 # Smart dates https://github.com/simonmichael/hledger/issues/1079
$ hledger -f- activity -b 2019-02-01 -e 'next year' $ hledger -f- activity -b 2019-02-01 -e 'next year'

View File

@ -1,9 +1,9 @@
# 1. all data files on the command line should be read # 1. all data files on the command line should be read
hledger inc -f personal.journal -f business.journal hledger inc -f personal.journal -f business.journal
>>> >>>
Income Statement 2014/01/01-2014/01/02 Income Statement 2014-01-01-2014-01-02
|| 2014/01/01-2014/01/02 || 2014-01-01-2014-01-02
==========================++======================= ==========================++=======================
Revenues || Revenues ||
--------------------------++----------------------- --------------------------++-----------------------
@ -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 # 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 hledger print -f personal.journal -f business.journal -f alias.journal -f personal.journal
>>> >>>
2014/01/01 2014-01-01
expenses:office supplies $1 expenses:office supplies $1
assets:business checking assets:business checking
2014/01/02 2014-01-02
expenses:food $1 expenses:food $1
assets:cash assets:cash
2014/01/02 2014-01-02
expenses:food $1 expenses:food $1
assets:cash 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 # 3. files can be of different formats
hledger print -f personal.journal -f ../journal/a.timeclock -f ../journal/b.timedot hledger print -f personal.journal -f ../journal/a.timeclock -f ../journal/b.timedot
>>> >>>
2014/01/02 2014-01-02
expenses:food $1 expenses:food $1
assets:cash assets:cash
2016/01/01 * 12:00-16:00 2016-01-01 * 12:00-16:00
(a:aa) 4.00h (a:aa) 4.00h
2016/01/01 * 2016-01-01 *
(b.bb) 1.00 (b.bb) 1.00
>>>2 >>>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 # 4. same-date transactions in different files are shown in the right order
hledger -f a.j -f b.j reg hledger -f a.j -f b.j reg
>>> >>>
2018/01/01 a1 (a) 1 1 2018-01-01 a1 (a) 1 1
2018/01/01 b1 (b) 1 2 2018-01-01 b1 (b) 1 2
>>>2 >>>2
>>>=0 >>>=0

View File

@ -5,7 +5,7 @@ hledger -f- register 'a a'
a a 1 a a 1
b b
>>> >>>
2010/03/01 x a a 1 1 2010-03-01 x a a 1 1
>>>=0 >>>=0
# #
@ -20,7 +20,7 @@ hledger -f- register desc:'x x'
a 1 a 1
b b
>>> >>>
2010/03/02 x x a 1 1 2010-03-02 x x a 1 1
b -1 0 b -1 0
>>>=0 >>>=0
@ -32,6 +32,6 @@ hledger -f- register 'a a' "'b"
a a 1 a a 1
'b 'b
>>> >>>
2011/09/11 a a 1 1 2011-09-11 a a 1 1
'b -1 0 'b -1 0
>>>=0 >>>=0

View File

@ -17,14 +17,14 @@ $ hledger -f- register --weekly --monthly
2019/02 a 1 3 2019/02 a 1 3
$ hledger -f- register --monthly --weekly $ hledger -f- register --monthly --weekly
2018/12/31w01 a 2 2 2018-12-31w01 a 2 2
2019/01/28w05 a 1 3 2019-01-28w05 a 1 3
# The last report interval option takes precedence. # The last report interval option takes precedence.
# The --period expression is no exception. # The --period expression is no exception.
$ hledger -f- register -p 'monthly in 2019' --weekly $ hledger -f- register -p 'monthly in 2019' --weekly
2018/12/31w01 a 2 2 2018-12-31w01 a 2 2
2019/01/28w05 a 1 3 2019-01-28w05 a 1 3
$ hledger -f- register --weekly -p 'monthly in 2019' $ hledger -f- register --weekly -p 'monthly in 2019'
2019/01 a 2 2 2019/01 a 2 2

View File

@ -19,13 +19,13 @@
assets:cash assets:cash
$ hledger close -f- -p 2016 assets liabilities $ hledger close -f- -p 2016 assets liabilities
2016/12/31 closing balances 2016-12-31 closing balances
assets:bank $-80 = $0 assets:bank $-80 = $0
assets:cash $-10 = $0 assets:cash $-10 = $0
liabilities $-25 = $0 liabilities $-25 = $0
equity:closing balances $115 equity:closing balances $115
2017/01/01 opening balances 2017-01-01 opening balances
assets:bank $80 = $80 assets:bank $80 = $80
assets:cash $10 = $10 assets:cash $10 = $10
liabilities $25 = $25 liabilities $25 = $25
@ -39,11 +39,11 @@ $ hledger close -f- -p 2016 assets liabilities
(a) 1 (a) 1
$ hledger close -f- -b2017/6/1 -e2018 $ hledger close -f- -b2017/6/1 -e2018
2017/12/31 closing balances 2017-12-31 closing balances
a -1 = 0 a -1 = 0
equity:closing balances 1 equity:closing balances 1
2018/01/01 opening balances 2018-01-01 opening balances
a 1 = 1 a 1 = 1
equity:opening balances -1 equity:opening balances -1
@ -69,7 +69,7 @@ $ hledger close -f- -b2017/6/1 -e2018
assets:cash assets:cash
$ hledger close -f- -p 2016 assets liabilities --opening $ hledger close -f- -p 2016 assets liabilities --opening
2017/01/01 opening balances 2017-01-01 opening balances
assets:bank $80 = $80 assets:bank $80 = $80
assets:cash $10 = $10 assets:cash $10 = $10
liabilities $25 = $25 liabilities $25 = $25
@ -97,7 +97,7 @@ $ hledger close -f- -p 2016 assets liabilities --opening
assets:cash assets:cash
$ hledger close -f- -p 2016 assets liabilities --closing $ hledger close -f- -p 2016 assets liabilities --closing
2016/12/31 closing balances 2016-12-31 closing balances
assets:bank $-80 = $0 assets:bank $-80 = $0
assets:cash $-10 = $0 assets:cash $-10 = $0
liabilities $-25 = $0 liabilities $-25 = $0
@ -125,13 +125,13 @@ $ hledger close -f- -p 2016 assets liabilities --closing
assets:cash assets:cash
$ hledger close -f- -p 2016 assets liabilities --opening --closing $ hledger close -f- -p 2016 assets liabilities --opening --closing
2016/12/31 closing balances 2016-12-31 closing balances
assets:bank $-80 = $0 assets:bank $-80 = $0
assets:cash $-10 = $0 assets:cash $-10 = $0
liabilities $-25 = $0 liabilities $-25 = $0
equity:closing balances $115 equity:closing balances $115
2017/01/01 opening balances 2017-01-01 opening balances
assets:bank $80 = $80 assets:bank $80 = $80
assets:cash $10 = $10 assets:cash $10 = $10
liabilities $25 = $25 liabilities $25 = $25
@ -149,13 +149,13 @@ $ hledger close -f- -p 2016 assets liabilities --opening --closing
equity equity
$ hledger -f- close assets -p 2019 $ hledger -f- close assets -p 2019
2019/12/31 closing balances 2019-12-31 closing balances
assets -1A @ 1B assets -1A @ 1B
assets -1A @ 1C = 0A assets -1A @ 1C = 0A
equity:closing balances 1A @ 1B equity:closing balances 1A @ 1B
equity:closing balances 1A @ 1C equity:closing balances 1A @ 1C
2020/01/01 opening balances 2020-01-01 opening balances
assets 1A @ 1B assets 1A @ 1B
assets 1A @ 1C = 2A assets 1A @ 1C = 2A
equity:opening balances -1A @ 1B equity:opening balances -1A @ 1B
@ -174,13 +174,13 @@ $ hledger -f- close assets -p 2019
(assets) 1A @ 2B (assets) 1A @ 2B
$ hledger -f- close assets -p 2019 $ hledger -f- close assets -p 2019
2019/12/31 closing balances 2019-12-31 closing balances
assets -1A @ 1B assets -1A @ 1B
assets -1A @ 2B = 0A assets -1A @ 2B = 0A
equity:closing balances 1A @ 1B equity:closing balances 1A @ 1B
equity:closing balances 1A @ 2B equity:closing balances 1A @ 2B
2020/01/01 opening balances 2020-01-01 opening balances
assets 1A @ 1B assets 1A @ 1B
assets 1A @ 2B = 2A assets 1A @ 2B = 2A
equity:opening balances -1A @ 1B equity:opening balances -1A @ 1B
@ -213,7 +213,7 @@ $ hledger -f- close assets -p 2019
liabilities:employer liabilities:employer
$ hledger -f- close -p 2016 assets liabilities $ 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 assets:bank -5,733.00 EUR = 0.00 EUR
liabilities:employer $-10,000.00 liabilities:employer $-10,000.00
liabilities:employer $5,000.00 @ 0.93 EUR 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,000.00 @ 0.95 EUR
equity:closing balances 5,734.00 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 assets:bank 5,733.00 EUR = 5,733.00 EUR
liabilities:employer $10,000.00 liabilities:employer $10,000.00
liabilities:employer $-5,000.00 @ 0.93 EUR liabilities:employer $-5,000.00 @ 0.93 EUR

View File

@ -8,7 +8,7 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 assets:myacct $50
income:unknown $-50 income:unknown $-50
@ -28,11 +28,11 @@ amount-out %4
currency $ currency $
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co🎅 2009-09-10 Flubber Co🎅
Assets:MyAccount $50 Assets:MyAccount $50
income:unknown $-50 income:unknown $-50
2009/09/11 Flubber Co🎅 2009-09-11 Flubber Co🎅
Assets:MyAccount $-50 Assets:MyAccount $-50
expenses:unknown $50 expenses:unknown $50
@ -51,7 +51,7 @@ if Flubber
account2 acct account2 acct
comment cmt comment cmt
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co ; cmt 2009-09-10 Flubber Co ; cmt
assets:myacct $50 assets:myacct $50
acct $-50 acct $-50
@ -68,7 +68,7 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 = $123 assets:myacct $50 = $123
income:unknown $-50 income:unknown $-50
@ -86,11 +86,11 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 = $123 assets:myacct $50 = $123
income:unknown $-50 income:unknown $-50
2009/09/11 Blubber Co 2009-09-11 Blubber Co
assets:myacct $60 assets:myacct $60
income:unknown $-60 income:unknown $-60
@ -108,11 +108,11 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 = $123 assets:myacct $50 = $123
income:unknown $-50 income:unknown $-50
2009/09/11 Blubber Co 2009-09-11 Blubber Co
assets:myacct $60 assets:myacct $60
income:unknown $-60 income:unknown $-60
@ -135,11 +135,11 @@ amount -%payment
account1 liabilities:bank account1 liabilities:bank
account2 expense:other account2 expense:other
$ ./hledger-csv $ ./hledger-csv
2009/10/09 2009-10-09
liabilities:bank $-50 liabilities:bank $-50
expense:other $50 expense:other $50
2009/11/09 2009-11-09
liabilities:bank $60 liabilities:bank $60
expense:other $-60 expense:other $-60
@ -160,11 +160,11 @@ amount-out %4
currency $ currency $
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co🎅 2009-09-10 Flubber Co🎅
Assets:MyAccount $50 Assets:MyAccount $50
income:unknown $-50 income:unknown $-50
2009/09/11 Flubber Co🎅 2009-09-11 Flubber Co🎅
Assets:MyAccount $-50 Assets:MyAccount $-50
expenses:unknown $50 expenses:unknown $50
@ -181,7 +181,7 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 assets:myacct $50
income:unknown $-50 = $123 income:unknown $-50 = $123
@ -198,7 +198,7 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 = $321 assets:myacct $50 = $321
income:unknown $-50 = $123 income:unknown $-50 = $123
@ -218,7 +218,7 @@ account3 expenses:tax
account4 the:remainder account4 the:remainder
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50.000 = $321.000 assets:myacct $50.000 = $321.000
expenses:unknown = $123.000 expenses:unknown = $123.000
expenses:tax $0.234 ; VAT expenses:tax $0.234 ; VAT
@ -239,7 +239,7 @@ account3 expenses:tax
account4 the:remainder account4 the:remainder
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 = $321 assets:myacct $50 = $321
expenses:unknown = $123 expenses:unknown = $123
expenses:tax £0.234 ; VAT expenses:tax £0.234 ; VAT
@ -261,11 +261,11 @@ amount-out %4
currency $ currency $
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co🎅 2009-09-10 Flubber Co🎅
Assets:MyAccount $50 Assets:MyAccount $50
income:unknown $-50 income:unknown $-50
2009/09/11 Flubber Co🎅 2009-09-11 Flubber Co🎅
Assets:MyAccount $-50 Assets:MyAccount $-50
expenses:unknown $50 expenses:unknown $50
@ -291,7 +291,7 @@ date-format %d/%Y/%m
currency $ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co Co Co 2009-09-10 Flubber Co Co Co
assets:myacct $50 assets:myacct $50
income:unknown $-50 income:unknown $-50
@ -310,7 +310,7 @@ if Flubber
account1 assets:%account1 account1 assets:%account1
amount-in (%amount-in) amount-in (%amount-in)
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $-50 assets:myacct $-50
expenses:unknown $50 expenses:unknown $50
@ -334,7 +334,7 @@ date %1
date-format %m/%d/%Y date-format %m/%d/%Y
description %description for %itemtitle description %description for %itemtitle
$ ./hledger-csv $ ./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:assets:online:paypal $9.41 = $57.60
sm:expenses:unknown sm:expenses:unknown
JS:expenses:banking:paypal $-0.59 JS:expenses:banking:paypal $-0.59
@ -383,11 +383,11 @@ if MIDDLE
skip 3 skip 3
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 assets:myacct $50
income:unknown $-50 income:unknown $-50
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 assets:myacct $50
income:unknown $-50 income:unknown $-50
@ -407,15 +407,15 @@ description Assets Update
account1 assets account1 assets
account2 income account2 income
$ ./hledger-csv $ ./hledger-csv
2018/10/15 Assets Update 2018-10-15 Assets Update
assets = EUR 100 assets = EUR 100
income income
2018/10/16 Assets Update 2018-10-16 Assets Update
assets = EUR 200 assets = EUR 200
income income
2018/10/17 Assets Update 2018-10-17 Assets Update
assets = EUR 300 assets = EUR 300
income income
@ -431,7 +431,7 @@ amount
comment x comment x
$ ./hledger-csv $ ./hledger-csv
2018/10/15 ; x 2018-10-15 ; x
>=0 >=0
@ -465,12 +465,12 @@ if ,Empty fee
skip skip
$ ./hledger-csv $ ./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:assets:online:paypal $9.41 = $57.60
sm:expenses:unknown sm:expenses:unknown
JS:expenses:banking:paypal $-0.59 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:assets:online:paypal $7.77 = $88.66
sm:expenses:unknown $-7.77 sm:expenses:unknown $-7.77
@ -488,7 +488,7 @@ currency $
account1 assets:myacct account1 assets:myacct
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
assets:myacct $50 ==* $123 assets:myacct $50 ==* $123
income:unknown $-50 income:unknown $-50
@ -505,7 +505,7 @@ currency $
account1 (assets:myacct) account1 (assets:myacct)
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
(assets:myacct) $50 = $123 (assets:myacct) $50 = $123
>=0 >=0
@ -522,7 +522,7 @@ account1 [assets:myacct]
account2 [assets:another-acct] account2 [assets:another-acct]
$ ./hledger-csv $ ./hledger-csv
2009/09/10 Flubber Co 2009-09-10 Flubber Co
[assets:myacct] $50 [assets:myacct] $50
[assets:another-acct] $-50 [assets:another-acct] $-50
@ -539,7 +539,7 @@ account1 (assets:myacct)
separator TAB separator TAB
$ ./hledger-csv $ ./hledger-csv
2009/10/01 Flubber Co 2009-10-01 Flubber Co
(assets:myacct) $50 = $123 (assets:myacct) $50 = $123
>=0 >=0
@ -553,7 +553,7 @@ $ ./hledger-csv
#account2 (a) #account2 (a)
# #
#$ ./hledger-csv #$ ./hledger-csv
#2019/01/01 #2019-01-01
# (a) 1 # (a) 1
# #
#>=0 #>=0

View File

@ -16,7 +16,7 @@ hledger bal -M -b 2016-11 -e 2017-02 -f - --forecast
expenses:grocery $30 expenses:grocery $30
assets:cash assets:cash
>>> >>>
Balance changes in 2016/12/01-2017/01/31: Balance changes in 2016-12-01-2017-01-31:
|| Dec Jan || Dec Jan
==================++=============== ==================++===============
@ -46,11 +46,11 @@ hledger print -b 2016-11 -e 2017-02 -f - --forecast
expenses:grocery $30 expenses:grocery $30
assets:cash assets:cash
>>> >>>
2016/12/31 2016-12-31
expenses:housing $600 expenses:housing $600
assets:cash 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 ; generated-transaction: ~ monthly from 2016/1
income $-1000 income $-1000
expenses:food $20 expenses:food $20
@ -76,7 +76,7 @@ hledger register -b 2016-11 -e 2017-02 -f - --forecast tag:a
expenses:grocery $30 expenses:grocery $30
assets:cash assets:cash
>>> >>>
2017/01/01 income $-1000 $-1000 2017-01-01 income $-1000 $-1000
expenses:food $20 $-980 expenses:food $20 $-980
expenses:leisure $15 $-965 expenses:leisure $15 $-965
expenses:grocery $30 $-935 expenses:grocery $30 $-935
@ -99,9 +99,9 @@ hledger register -b 2015-12 -e 2017-02 -f - assets:cash --forecast
income $-10000 ; bonus income $-10000 ; bonus
assets:cash assets:cash
>>> >>>
2016/01/01 assets:cash $-10 $-10 2016-01-01 assets:cash $-10 $-10
2016/12/02 assets:cash $-600 $-610 2016-12-02 assets:cash $-600 $-610
2017/01/01 assets:cash $10000 $9390 2017-01-01 assets:cash $10000 $9390
>>>2 >>>2
>>>=0 >>>=0
@ -117,7 +117,7 @@ Y 2000
2000/1/1 real 2000/1/1 real
>>> >>>
2000/02/01 forecast 2000-02-01 forecast
; generated-transaction: ~ 2/1 ; generated-transaction: ~ 2/1
>>>2 >>>2
@ -134,7 +134,7 @@ Y 2000
2000/1/1 real 2000/1/1 real
>>> >>>
2000/01/15 forecast 2000-01-15 forecast
; generated-transaction: ~ 15 ; generated-transaction: ~ 15
>>>2 >>>2
@ -151,7 +151,7 @@ Y 2000
2000/1/1 real 2000/1/1 real
>>> >>>
2000/02/01 forecast 2000-02-01 forecast
; generated-transaction: ~ next month ; generated-transaction: ~ next month
>>>2 >>>2

View File

@ -4,5 +4,5 @@ hledger -f - register τράπ
τράπεζα 10 руб τράπεζα 10 руб
नकद नकद
>>> >>>
2009/01/01 проверка τράπεζα 10 руб 10 руб 2009-01-01 проверка τράπεζα 10 руб 10 руб
>>>=0 >>>=0

View File

@ -7,6 +7,6 @@ hledger -f - register desc:аура
bank 20 bank 20
cash cash
>>> >>>
2009/01/01 аура (cyrillic le.. bank 10 10 2009-01-01 аура (cyrillic le.. bank 10 10
cash -10 0 cash -10 0
>>>=0 >>>=0

View File

@ -4,7 +4,7 @@ hledger -f - print
счёт:первый 1 счёт:первый 1
счёт:второй счёт:второй
>>> >>>
2009/01/01 проверка 2009-01-01 проверка
счёт:первый 1 счёт:первый 1
счёт:второй счёт:второй

View File

@ -4,6 +4,6 @@ hledger -f - register
τράπεζα 10 руб τράπεζα 10 руб
नकद नकद
>>> >>>
2009/01/01 проверка τράπεζα 10 руб 10 руб 2009-01-01 проверка τράπεζα 10 руб 10 руб
नकद -10 руб 0 नकद -10 руб 0
>>>=0 >>>=0

View File

@ -19,15 +19,15 @@ hledger -f - print
㐀:㐁:㐂:㐃:㐄 1 㐀:㐁:㐂:㐃:㐄 1
㐀 -1 㐀 -1
>>> >>>
2000/01/01 transaction 1 2000-01-01 transaction 1
㐀 㐃㐃1 @ 2 㐂㐂㐂㐂㐂㐂㐂㐂㐂㐂㐂 㐀 㐃㐃1 @ 2 㐂㐂㐂㐂㐂㐂㐂㐂㐂㐂㐂
㐀:㐁 ; 㐃㐃-1 㐀:㐁 ; 㐃㐃-1
2000/01/02 transaction 2 2000-01-02 transaction 2
㐀:㐁:㐂 USD 1 㐀:㐁:㐂 USD 1
㐀:㐁:㐂:㐃 EUR -1 㐀:㐁:㐂:㐃 EUR -1
2000/01/03 transaction 3 2000-01-03 transaction 3
㐀:㐁:㐂:㐃:㐄 1 㐀:㐁:㐂:㐃:㐄 1
㐀 -1 㐀 -1
@ -37,11 +37,11 @@ hledger -f - print
# 2. # 2.
hledger -f chinese.journal register --width 80 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 㐀:㐁 -1 A 0
2000/01/02 transaction 2 㐀:㐁:㐂 1 A 1 A 2000-01-02 transaction 2 㐀:㐁:㐂 1 A 1 A
㐀:㐁:㐂:㐃 -1 A 0 㐀:㐁:㐂:㐃 -1 A 0
2000/01/03 transaction 3 㐀:㐁:㐂:㐃:㐄 1 A 1 A 2000-01-03 transaction 3 㐀:㐁:㐂:㐃:㐄 1 A 1 A
㐀 -1 A 0 㐀 -1 A 0
>>>2 >>>2
>>>=0 >>>=0

View File

@ -5,9 +5,9 @@ hledger -f - incomestatement
income 1 income 1
b b
>>> >>>
Income Statement 2016/01/01 Income Statement 2016-01-01
|| 2016/01/01 || 2016-01-01
==========++============ ==========++============
Revenues || Revenues ||
----------++------------ ----------++------------
@ -90,9 +90,9 @@ hledger -f - incomestatement -b 2015 -e 2017
assets:checking $10.00 assets:checking $10.00
assets:receivables -$10.00 assets:receivables -$10.00
>>> >>>
Income Statement 2015/01/01-2016/12/31 Income Statement 2015-01-01-2016-12-31
|| 2015/01/01-2016/12/31 || 2015-01-01-2016-12-31
===================++======================= ===================++=======================
Revenues || Revenues ||
-------------------++----------------------- -------------------++-----------------------
@ -243,7 +243,7 @@ Income Statement 2008
# old (arithmetic sign): # old (arithmetic sign):
# Income Statement (Historical Ending Balances) # 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 || # Revenues ||
# -------------------++------------------------------------------------------------------------------------------------------------------------------------------------ # -------------------++------------------------------------------------------------------------------------------------------------------------------------------------
@ -263,9 +263,9 @@ Income Statement 2008
# #
hledger -f sample.journal incomestatement -p 'monthly in 2008' --historical hledger -f sample.journal incomestatement -p 'monthly in 2008' --historical
>>> >>>
Income Statement 2008/01/31,,2008/12/31 (Historical Ending Balances) 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 || Revenues ||
-------------------++------------------------------------------------------------------------------------------------------------------------------------------------ -------------------++------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -32,7 +32,7 @@ $ hledger -f- print
a 10 "DE 0002 635307" a 10 "DE 0002 635307"
b b
$ hledger -f- print --explicit $ hledger -f- print --explicit
2010/04/05 x 2010-04-05 x
a 10 "DE 0002 635307" a 10 "DE 0002 635307"
b -10 "DE 0002 635307" b -10 "DE 0002 635307"
@ -53,7 +53,7 @@ $ hledger -f- balance
Equity:Unbalanced Equity:Unbalanced
$ hledger -f- print -x $ hledger -f- print -x
2016/01/01 2016-01-01
saving-card $-105 saving-card $-105
snacks 95 EUR @@ $100 snacks 95 EUR @@ $100
Equity:Unbalanced $5 Equity:Unbalanced $5
@ -105,10 +105,10 @@ $ hledger -f- bal -V -N
# (a) 1,000 A # (a) 1,000 A
# #
#$ hledger -f- print #$ hledger -f- print
#2015/01/01 #2015-01-01
# (a) 1,000.00 A # (a) 1,000.00 A
# #
#2015/01/01 #2015-01-01
# (a) 1,000.00 A # (a) 1,000.00 A
# #
#>= #>=
@ -160,6 +160,6 @@ $ hledger -f- print
# #
# $ hledger -f- print # $ hledger -f- print
# could not balance this transaction (real postings are off by $9,990,000) # could not balance this transaction (real postings are off by $9,990,000)
# 2000/01/01 # 2000-01-01
# a $-10,000 # a $-10,000
# b $10,000,000 # b $10,000,000

View File

@ -15,14 +15,14 @@
# 1. print # 1. print
$ hledger print -f- --auto $ hledger print -f- --auto
2016/01/01 paycheck ; modified: 2016-01-01 paycheck ; modified:
income:remuneration $-100 income:remuneration $-100
(liabilities:tax) $-33 ; income tax, generated-posting: = ^income (liabilities:tax) $-33 ; income tax, generated-posting: = ^income
income:donations $-15 income:donations $-15
(liabilities:tax) $-5 ; income tax, generated-posting: = ^income (liabilities:tax) $-5 ; income tax, generated-posting: = ^income
assets:bank assets:bank
2016/01/01 withdraw 2016-01-01 withdraw
assets:cash $20 assets:cash $20
assets:bank assets:bank
@ -30,12 +30,12 @@ $ hledger print -f- --auto
# 2. register # 2. register
$ hledger register -f- --auto $ hledger register -f- --auto
2016/01/01 paycheck income:remuneration $-100 $-100 2016-01-01 paycheck income:remuneration $-100 $-100
(liabilities:tax) $-33 $-133 (liabilities:tax) $-33 $-133
income:donations $-15 $-148 income:donations $-15 $-148
(liabilities:tax) $-5 $-153 (liabilities:tax) $-5 $-153
assets:bank $115 $-38 assets:bank $115 $-38
2016/01/01 withdraw assets:cash $20 $-18 2016-01-01 withdraw assets:cash $20 $-18
assets:bank $-20 $-38 assets:bank $-20 $-38
>= >=
@ -63,7 +63,7 @@ $ hledger balance -f- --auto
# 4. # 4.
$ hledger register -f- --auto $ hledger register -f- --auto
2018/01/01 (trigger) 1 1 2018-01-01 (trigger) 1 1
(target) 10 11 (target) 10 11
(target) 1 12 (target) 1 12
>= >=
@ -80,7 +80,7 @@ $ hledger register -f- --auto
# 5. # 5.
$ hledger print -f- --auto $ hledger print -f- --auto
2018/10/07 * MARKET ; modified: 2018-10-07 * MARKET ; modified:
expenses:groceries:food expenses:groceries:food
[budget:groceries] $-20 ; generated-posting: = ^expenses:groceries [budget:groceries] $-20 ; generated-posting: = ^expenses:groceries
[assets:bank:checking] $20 ; generated-posting: = ^expenses:groceries [assets:bank:checking] $20 ; generated-posting: = ^expenses:groceries
@ -99,7 +99,7 @@ $ hledger print -f- --auto
# 6. # 6.
$ hledger -f- print --auto -x $ hledger -f- print --auto -x
2018/01/01 ; modified: 2018-01-01 ; modified:
(assets:billable:client1) 0.50h @ $90 (assets:billable:client1) 0.50h @ $90
assets:receivable:client1 50.00h @ $90 ; generated-posting: = assets:billable:client1 assets:receivable:client1 50.00h @ $90 ; generated-posting: = assets:billable:client1
revenues:client1 $-4500 ; generated-posting: = assets:billable:client1 revenues:client1 $-4500 ; generated-posting: = assets:billable:client1
@ -117,7 +117,7 @@ $ hledger -f- print --auto -x
# 7. # 7.
$ hledger -f- print --auto -x $ hledger -f- print --auto -x
2018/01/01 ; modified: 2018-01-01 ; modified:
(assets:billable:client1) 0.50h (assets:billable:client1) 0.50h
assets:receivable:client1 $50 ; generated-posting: = assets:billable:client1 assets:receivable:client1 $50 ; generated-posting: = assets:billable:client1
revenues: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. # 8.
$ hledger -f- print --auto -x $ hledger -f- print --auto -x
2018/01/01 ; modified: 2018-01-01 ; modified:
(assets:billable:client1) 0.50h @ $90 (assets:billable:client1) 0.50h @ $90
assets:receivable:client1 0.50 "Client1 Hours" @ $100.00 ; generated-posting: = assets:billable:client1 assets:receivable:client1 0.50 "Client1 Hours" @ $100.00 ; generated-posting: = assets:billable:client1
revenues:client1 $-50.00 ; generated-posting: = assets:billable:client1 revenues:client1 $-50.00 ; generated-posting: = assets:billable:client1
@ -180,7 +180,7 @@ $ hledger print -f- --auto
# 10. # 10.
$ hledger -f- print --auto $ hledger -f- print --auto
2018/01/01 ; modified: 2018-01-01 ; modified:
Expenses:Joint:Widgets $100.00 @ £0.50 Expenses:Joint:Widgets $100.00 @ £0.50
Expenses:Joint $-100.00 @ £0.50 ; generated-posting: = ^Expenses:Joint Expenses:Joint $-100.00 @ £0.50 ; generated-posting: = ^Expenses:Joint
Liabilities:Joint:Bob $50.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. # 11.
$ hledger -f- print --auto $ hledger -f- print --auto
2018/01/01 ; modified: 2018-01-01 ; modified:
Expenses:Joint:Widgets $100.00 @@ £50 Expenses:Joint:Widgets $100.00 @@ £50
Expenses:Joint $-100.00 @@ £50 ; generated-posting: = ^Expenses:Joint Expenses:Joint $-100.00 @@ £50 ; generated-posting: = ^Expenses:Joint
Liabilities:Joint:Bob $50.00 @@ £25 ; generated-posting: = ^Expenses:Joint Liabilities:Joint:Bob $50.00 @@ £25 ; generated-posting: = ^Expenses:Joint
@ -231,7 +231,7 @@ $ hledger -f- print --auto
# 12. # 12.
$ hledger -f- print --auto $ hledger -f- print --auto
2018/01/01 ; modified: 2018-01-01 ; modified:
Expenses:Joint:Widgets $100.00 Expenses:Joint:Widgets $100.00
Expenses:Joint $-100.00 @@ £50 ; generated-posting: = ^Expenses:Joint Expenses:Joint $-100.00 @@ £50 ; generated-posting: = ^Expenses:Joint
Liabilities:Joint:Bob $50.00 @@ £25 ; generated-posting: = ^Expenses:Joint Liabilities:Joint:Bob $50.00 @@ £25 ; generated-posting: = ^Expenses:Joint
@ -259,11 +259,11 @@ $ hledger -f- print --auto
# 13. # 13.
$ hledger print -f- --auto --forecast -b 2016-01 -e 2016-03 $ hledger print -f- --auto --forecast -b 2016-01 -e 2016-03
2016/01/03 withdraw 2016-01-03 withdraw
assets:cash $20 assets:cash $20
assets:bank assets:bank
2016/02/01 paycheck 2016-02-01 paycheck
; generated-transaction: ~ monthly from 2016-01, modified: ; generated-transaction: ~ monthly from 2016-01, modified:
income:remuneration $-100 income:remuneration $-100
(liabilities:tax) $-33 ; income tax, generated-posting: = ^income (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 # 14. and they don't force --auto on
$ hledger print -f- --forecast -b 2016-01 -e 2016-03 $ hledger print -f- --forecast -b 2016-01 -e 2016-03
2016/01/03 withdraw 2016-01-03 withdraw
assets:cash $20 assets:cash $20
assets:bank assets:bank
2016/02/01 paycheck 2016-02-01 paycheck
; generated-transaction: ~ monthly from 2016-01 ; generated-transaction: ~ monthly from 2016-01
income:remuneration $-100 income:remuneration $-100
income:donations $-15 income:donations $-15
@ -299,7 +299,7 @@ $ hledger print -f- --forecast -b 2016-01 -e 2016-03
# 15. # 15.
$ hledger -f- register --auto $ 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 [budget:groceries] $-20 0
[as:bank:checking] $20 $20 [as:bank:checking] $20 $20
assets:bank:checking $-20 0 assets:bank:checking $-20 0
@ -316,7 +316,7 @@ $ hledger -f- register --auto
# 16. Transaction balancing sees auto postings ? # 16. Transaction balancing sees auto postings ?
# $ hledger -f- print -x --auto # $ hledger -f- print -x --auto
# 2018/12/18 # 2018-12-18
# a EUR -10.00 ; :tax20: # a EUR -10.00 ; :tax20:
# taxes EUR -2.00 # taxes EUR -2.00
# b EUR 12.00 # b EUR 12.00

View File

@ -348,7 +348,7 @@ hledger -f- print
2019/01/01 2019/01/01
(a) 1A @ 1B = 1A @ 2B (a) 1A @ 1B = 1A @ 2B
>>> >>>
2019/01/01 2019-01-01
(a) 1A @ 1B = 1A @ 2B (a) 1A @ 1B = 1A @ 2B
>>>=0 >>>=0
@ -360,7 +360,7 @@ hledger -f- print --explicit
2019/01/01 2019/01/01
(a) = 1A @ 2B (a) = 1A @ 2B
>>> >>>
2019/01/01 2019-01-01
(a) 1A @ 2B = 1A @ 2B (a) 1A @ 2B = 1A @ 2B
>>>=0 >>>=0
@ -420,7 +420,7 @@ hledger -f- print
(a:b) 0 =* Y7 (a:b) 0 =* Y7
(a:b) 0 ==* Y7 (a:b) 0 ==* Y7
>>> >>>
2019/01/01 2019-01-01
(a) X1 (a) X1
(a) Y3 (a) Y3
(a:b) Y7 (a:b) Y7

View File

@ -23,7 +23,7 @@ hledger -f - print
; trailing file comment, ignored ; trailing file comment, ignored
>>> >>>
2009/01/01 x ; transaction same line comment 2009-01-01 x ; transaction same line comment
; transaction new line comment ; transaction new line comment
a 1 ; posting 1 same line comment a 1 ; posting 1 same line comment
; posting 1 new line comment ; posting 1 new line comment
@ -38,7 +38,7 @@ hledger -f - print
<<< <<<
2017/1/1 this # and * are not ; the comment 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 >>>2
>>>=0 >>>=0
@ -58,7 +58,7 @@ hledger -f - register
b b
>>> >>>
2010/01/01 x a 1 1 2010-01-01 x a 1 1
b -1 0 b -1 0
>>>2 >>>2
>>>=0 >>>=0

View File

@ -22,7 +22,7 @@ hledger -f- print
a 1 a 1
b b
>>> >>>
2000/02/29 x 2000-02-29 x
a 1 a 1
b b

View File

@ -10,7 +10,7 @@ hledger -f- print
a 1000 a 1000
b b
>>> >>>
2010/01/01 2010-01-01
a 1000 a 1000
b b
@ -24,7 +24,7 @@ D £1000.00
a 1000 a 1000
b b
>>> >>>
2010/01/01 2010-01-01
a £1000.00 a £1000.00
b b
@ -38,7 +38,7 @@ D $1,000
a 1000 a 1000
b b
>>> >>>
2010/01/01 2010-01-01
a $1000,000 a $1000,000
b b
@ -51,7 +51,7 @@ D $1,000.0
2010/1/1 2010/1/1
(a) 1000000 (a) 1000000
>>> >>>
2010/01/01 2010-01-01
(a) $1,000,000.0 (a) $1,000,000.0
>>>=0 >>>=0
@ -66,7 +66,7 @@ D $1,000.0
(a) $1000000.00 (a) $1000000.00
(b) 1000000 (b) 1000000
>>> >>>
2010/01/01 2010-01-01
(a) $1,000,000.00 (a) $1,000,000.00
(b) $1,000,000.00 (b) $1,000,000.00
@ -85,7 +85,7 @@ D $1000.
(a) €1 (a) €1
>>> >>>
2018/01/01 ; modified: 2018-01-01 ; modified:
(a) €1 (a) €1
(b) €2 ; generated-posting: = a (b) €2 ; generated-posting: = a

View File

@ -25,9 +25,9 @@ account b L
(b:bb) 3 (b:bb) 3
$ hledger -f - bs -N --flat $ hledger -f - bs -N --flat
Balance Sheet 2018/01/01 Balance Sheet 2018-01-01
|| 2018/01/01 || 2018-01-01
=============++============ =============++============
Assets || Assets ||
-------------++------------ -------------++------------
@ -46,9 +46,9 @@ Balance Sheet 2018/01/01
# It must be shown above bb, but since not an asset, its balance is excluded there. # It must be shown above bb, but since not an asset, its balance is excluded there.
# It is shown again in the liabilities section, this time with balance. # It is shown again in the liabilities section, this time with balance.
$ hledger -f - bs -N $ hledger -f - bs -N
Balance Sheet 2018/01/01 Balance Sheet 2018-01-01
|| 2018/01/01 || 2018-01-01
=============++============ =============++============
Assets || Assets ||
-------------++------------ -------------++------------

View File

@ -1,16 +1,16 @@
# 1. nested includes in subdirectories # 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 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 (A) 1
2010/01/01 2010-01-01
(B) 1 (B) 1
2010/01/01 2010-01-01
(C) 1 (C) 1
2010/01/01 2010-01-01
(D) 1 (D) 1
>>>2 >>>2
@ -25,13 +25,13 @@ hledger -f - print
include a.timeclock include a.timeclock
include b.timedot include b.timedot
>>> >>>
2016/01/01 2016-01-01
(x) 1.00 (x) 1.00
2016/01/01 * 12:00-16:00 2016-01-01 * 12:00-16:00
(a:aa) 4.00h (a:aa) 4.00h
2016/01/01 * 2016-01-01 *
(b.bb) 1.00 (b.bb) 1.00
>>>=0 >>>=0
@ -41,10 +41,10 @@ include b.timedot
<<< <<<
include *b.journal include *b.journal
>>> >>>
2018/01/01 2018-01-01
(A) 1 (A) 1
2018/01/01 2018-01-01
(B) 1 (B) 1
>>>=0 >>>=0
@ -66,7 +66,7 @@ include doesnotexist.journal
<<< <<<
include ~/included.journal include ~/included.journal
>>> >>>
2018/01/01 2018-01-01
(A) 1 (A) 1
>>>2 >>>2

View File

@ -5,7 +5,7 @@ hledger -f - print
b (b) b -1 b (b) b -1
c c
>>> >>>
2009/01/01 x 2009-01-01 x
a 2 a 2
b (b) b -1 b (b) b -1
c c

View File

@ -27,7 +27,7 @@ expecting date separator or digit
# But in this case the timedot reader can parse it. # But in this case the timedot reader can parse it.
$ hledger -f - print $ hledger -f - print
> >
2018/01/01 * 2018-01-01 *
(a) 1.00 (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 # 5. hledger doesn't detect this as an error directly, it parses account name "(a) 1" and
# amount 0 here. # amount 0 here.
$ hledger -f - print -x $ hledger -f - print -x
2018/01/01 2018-01-01
(a) 1 0 (a) 1 0
>= >=

View File

@ -5,7 +5,7 @@ hledger -f- register
<<< <<<
2000/1/2 2000/1/2
a 0 ; date: 3/4, date: 4-5, date:6.7 a 0 ; date: 3/4, date: 4-5, date:6.7
>>> /^2000\/03\/04/ >>> /^2000-03-04/
>>>=0 >>>=0
# 2. If the date: or date2: tags do not have a valid simple date # 2. If the date: or date2: tags do not have a valid simple date
@ -33,7 +33,7 @@ hledger -f- register --date2
<<< <<<
2000/1/2 2000/1/2
a 0 ; [=3-4] a 0 ; [=3-4]
>>> /^2000\/03\/04/ >>> /^2000-03-04/
>>>=0 >>>=0
# 4. Date parsing and error reporting activates for square brackets # 4. Date parsing and error reporting activates for square brackets

View File

@ -8,7 +8,7 @@ hledger -f - print
A 55.3653 C @ 30.92189512 D A 55.3653 C @ 30.92189512 D
A -1712 D A -1712 D
>>> >>>
2010/01/01 x 2010-01-01 x
A 55.3653 C @ 30.92189512 D A 55.3653 C @ 30.92189512 D
A -1712 D A -1712 D
@ -24,7 +24,7 @@ hledger -f - print --explicit
a 1C @ $1.0049 a 1C @ $1.0049
a a
>>> >>>
2010/01/01 2010-01-01
a 0 a 0
a 1C @ $1.0049 a 1C @ $1.0049
a $-1.00 a $-1.00
@ -122,7 +122,7 @@ hledger -f- print --explicit
c C 11.00 c C 11.00
d D -320.00 d D -320.00
>>> >>>
2015/01/01 2015-01-01
c C 10.00 @ D 15.2381 c C 10.00 @ D 15.2381
c C 11.00 @ D 15.2381 c C 11.00 @ D 15.2381
d D -320.00 d D -320.00
@ -139,7 +139,7 @@ hledger -f- print --explicit
e E 11 e E 11
f F -320.000 f F -320.000
>>> >>>
2015/01/01 2015-01-01
e E 10.0000 @ F 15.2380952 e E 10.0000 @ F 15.2380952
e E 11.0000 @ F 15.2380952 e E 11.0000 @ F 15.2380952
f F -320.000 f F -320.000

View File

@ -37,7 +37,7 @@ commodity $1,000.00000000
c $1E+3 c $1E+3
d d
>>> >>>
2018/01/01 2018-01-01
a $105.00000000 a $105.00000000
b $3.14159260 b $3.14159260
c $1,000.00000000 c $1,000.00000000

View File

@ -3,15 +3,15 @@
# 1. transactions and postings have status marks which are nothing, ! or * # 1. transactions and postings have status marks which are nothing, ! or *
hledger -fstatus.journal print hledger -fstatus.journal print
>>> >>>
2017/01/01 unmarked 2017-01-01 unmarked
(a) 1 (a) 1
(b) 1 (b) 1
2017/01/02 ! pending 2017-01-02 ! pending
(a) 1 (a) 1
! (b) 1 ! (b) 1
2017/01/03 * cleared 2017-01-03 * cleared
(a) 1 (a) 1
* (b) 1 * (b) 1
@ -22,7 +22,7 @@ hledger -f- print desc:%
<<< <<<
2017/01/01 % 2017/01/01 %
>>> >>>
2017/01/01 % 2017-01-01 %
>>>=0 >>>=0
@ -31,7 +31,7 @@ hledger -f- print desc:%
# 3. --cleared matches * only # 3. --cleared matches * only
hledger -fstatus.journal print --cleared hledger -fstatus.journal print --cleared
>>> >>>
2017/01/03 * cleared 2017-01-03 * cleared
(a) 1 (a) 1
* (b) 1 * (b) 1
@ -40,7 +40,7 @@ hledger -fstatus.journal print --cleared
# 4. --pending matches ! only # 4. --pending matches ! only
hledger -fstatus.journal print --pending hledger -fstatus.journal print --pending
>>> >>>
2017/01/02 ! pending 2017-01-02 ! pending
(a) 1 (a) 1
! (b) 1 ! (b) 1
@ -49,7 +49,7 @@ hledger -fstatus.journal print --pending
# 5. --unmarked matches no status mark only # 5. --unmarked matches no status mark only
hledger -fstatus.journal print --unmarked hledger -fstatus.journal print --unmarked
>>> >>>
2017/01/01 unmarked 2017-01-01 unmarked
(a) 1 (a) 1
(b) 1 (b) 1
@ -58,9 +58,9 @@ hledger -fstatus.journal print --unmarked
# 6. these flags can be combined # 6. these flags can be combined
hledger -fstatus.journal register --unmarked --pending hledger -fstatus.journal register --unmarked --pending
>>> >>>
2017/01/01 unmarked (a) 1 1 2017-01-01 unmarked (a) 1 1
(b) 1 2 (b) 1 2
2017/01/02 pending (a) 1 3 2017-01-02 pending (a) 1 3
(b) 1 4 (b) 1 4
>>>= 0 >>>= 0
@ -76,7 +76,7 @@ hledger -fstatus.journal balance -N --unmarked
# 8. status:* matches * only # 8. status:* matches * only
hledger -fstatus.journal print status:* hledger -fstatus.journal print status:*
>>> >>>
2017/01/03 * cleared 2017-01-03 * cleared
(a) 1 (a) 1
* (b) 1 * (b) 1
@ -85,7 +85,7 @@ hledger -fstatus.journal print status:*
# 9. status:! matches ! only # 9. status:! matches ! only
hledger -fstatus.journal print status:! hledger -fstatus.journal print status:!
>>> >>>
2017/01/02 ! pending 2017-01-02 ! pending
(a) 1 (a) 1
! (b) 1 ! (b) 1
@ -94,7 +94,7 @@ hledger -fstatus.journal print status:!
# 10. status: matches unmarked only # 10. status: matches unmarked only
hledger -fstatus.journal print status: hledger -fstatus.journal print status:
>>> >>>
2017/01/01 unmarked 2017-01-01 unmarked
(a) 1 (a) 1
(b) 1 (b) 1
@ -103,11 +103,11 @@ hledger -fstatus.journal print status:
# 11. multiple status: queries are OR'd # 11. multiple status: queries are OR'd
hledger -fstatus.journal print status: status:! hledger -fstatus.journal print status: status:!
>>> >>>
2017/01/01 unmarked 2017-01-01 unmarked
(a) 1 (a) 1
(b) 1 (b) 1
2017/01/02 ! pending 2017-01-02 ! pending
(a) 1 (a) 1
! (b) 1 ! (b) 1

View File

@ -6,7 +6,7 @@ hledger -f- print --explicit
expenses:foreign currency €100 @ $1.35 expenses:foreign currency €100 @ $1.35
assets assets
>>> >>>
2011/01/01 2011-01-01
expenses:foreign currency €100 @ $1.35 expenses:foreign currency €100 @ $1.35
assets $-135.00 assets $-135.00
@ -19,7 +19,7 @@ hledger -f- print --explicit --cost
expenses:foreign currency €100 @ $1.35 expenses:foreign currency €100 @ $1.35
assets assets
>>> >>>
2011/01/01 2011-01-01
expenses:foreign currency $135.00 expenses:foreign currency $135.00
assets $-135.00 assets $-135.00
@ -32,7 +32,7 @@ hledger -f - print --explicit
expenses:foreign currency €100 @@ $135 expenses:foreign currency €100 @@ $135
assets assets
>>> >>>
2011/01/01 2011-01-01
expenses:foreign currency €100 @@ $135 expenses:foreign currency €100 @@ $135
assets $-135 assets $-135
@ -50,7 +50,7 @@ hledger -f - print --explicit
misc €-1 misc €-1
misc $-2.1 misc $-2.1
>>> >>>
2011/01/01 2011-01-01
expenses:foreign currency €100 @ $1.35 expenses:foreign currency €100 @ $1.35
misc $2.10 misc $2.10
assets $-135.00 assets $-135.00
@ -67,7 +67,7 @@ hledger -f - print --explicit
c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG
a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72 a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72
>>> >>>
2002/09/30 * 1a1a6305d06ce4b284dba0d267c23f69d70c20be 2002-09-30 * 1a1a6305d06ce4b284dba0d267c23f69d70c20be
c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG @@ $17,783.72 c56a21d23a6535184e7152ee138c28974f14280c 866.231000 GGGGG @@ $17,783.72
a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72 a35e82730cf91569c302b313780e5895f75a62b9 $-17,783.72

View File

@ -100,7 +100,7 @@ P 2000/1/1 $ €1.20
(a) $100 (a) $100
$ hledger -f- reg -V $ 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. # 8. print -V affects posting amounts but not balance assertions.
@ -110,7 +110,7 @@ P 2000/1/1 $ €1.20
(a) $100 = $100 (a) $100 = $100
$ hledger -f- print -V $ hledger -f- print -V
2000/01/01 2000-01-01
(a) €120.00 = $100 (a) €120.00 = $100
>=0 >=0
@ -137,23 +137,23 @@ P 2000/04/01 A 4 B
# 9. print costs using transaction prices # 9. print costs using transaction prices
$ hledger -f- print --value=cost $ hledger -f- print --value=cost
2000/01/01 2000-01-01
(a) 6 B (a) 6 B
2000/02/01 2000-02-01
(a) 7 B (a) 7 B
2000/03/01 2000-03-01
(a) 8 B (a) 8 B
>=0 >=0
# 10. print value using prices on last day of report period (2000-02-29) # 10. print value using prices on last day of report period (2000-02-29)
$ hledger -f- print --value=end date:2000/01-2000/03 $ hledger -f- print --value=end date:2000/01-2000/03
2000/01/01 2000-01-01
(a) 2 B (a) 2 B
2000/02/01 2000-02-01
(a) 2 B (a) 2 B
>=0 >=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) # 11. print value using prices on last day of report period (no period specified)
# specified - uses last day of journal (2000-03-01) # specified - uses last day of journal (2000-03-01)
$ hledger -f- print --value=end $ hledger -f- print --value=end
2000/01/01 2000-01-01
(a) 3 B (a) 3 B
2000/02/01 2000-02-01
(a) 3 B (a) 3 B
2000/03/01 2000-03-01
(a) 3 B (a) 3 B
>=0 >=0
# 12. print value using prices on a specified date # 12. print value using prices on a specified date
$ hledger -f- print --value=2000-01-15 $ hledger -f- print --value=2000-01-15
2000/01/01 2000-01-01
(a) 5 B (a) 5 B
2000/02/01 2000-02-01
(a) 5 B (a) 5 B
2000/03/01 2000-03-01
(a) 5 B (a) 5 B
>=0 >=0
@ -188,13 +188,13 @@ $ hledger -f- print --value=2000-01-15
# 13. print value using prices today # 13. print value using prices today
# (assuming today's date is >= 2000-04-01) # (assuming today's date is >= 2000-04-01)
$ hledger -f- print --value=now $ hledger -f- print --value=now
2000/01/01 2000-01-01
(a) 4 B (a) 4 B
2000/02/01 2000-02-01
(a) 4 B (a) 4 B
2000/03/01 2000-03-01
(a) 4 B (a) 4 B
>=0 >=0
@ -203,53 +203,53 @@ $ hledger -f- print --value=now
# 14. register report valued at cost. # 14. register report valued at cost.
$ hledger -f- reg --value=cost $ hledger -f- reg --value=cost
2000/01/01 (a) 6 B 6 B 2000-01-01 (a) 6 B 6 B
2000/02/01 (a) 7 B 13 B 2000-02-01 (a) 7 B 13 B
2000/03/01 (a) 8 B 21 B 2000-03-01 (a) 8 B 21 B
# 15. register report valued at period end # 15. register report valued at period end
$ hledger -f- reg --value=end $ hledger -f- reg --value=end
2000/01/01 (a) 3 B 3 B 2000-01-01 (a) 3 B 3 B
2000/02/01 (a) 3 B 6 B 2000-02-01 (a) 3 B 6 B
2000/03/01 (a) 3 B 9 B 2000-03-01 (a) 3 B 9 B
# 16. register report valued at specified date # 16. register report valued at specified date
$ hledger -f- reg --value=2000-01-15 $ hledger -f- reg --value=2000-01-15
2000/01/01 (a) 5 B 5 B 2000-01-01 (a) 5 B 5 B
2000/02/01 (a) 5 B 10 B 2000-02-01 (a) 5 B 10 B
2000/03/01 (a) 5 B 15 B 2000-03-01 (a) 5 B 15 B
# 17. register report valued today # 17. register report valued today
$ hledger -f- reg --value=now $ hledger -f- reg --value=now
2000/01/01 (a) 4 B 4 B 2000-01-01 (a) 4 B 4 B
2000/02/01 (a) 4 B 8 B 2000-02-01 (a) 4 B 8 B
2000/03/01 (a) 4 B 12 B 2000-03-01 (a) 4 B 12 B
# 18. single-period register report valued at default date (same as --value=now) # 18. single-period register report valued at default date (same as --value=now)
$ hledger -f- reg -V $ hledger -f- reg -V
2000/01/01 (a) 4 B 4 B 2000-01-01 (a) 4 B 4 B
2000/02/01 (a) 4 B 8 B 2000-02-01 (a) 4 B 8 B
2000/03/01 (a) 4 B 12 B 2000-03-01 (a) 4 B 12 B
# register with -H (starting balance) # register with -H (starting balance)
# 19. register with starting balance, valued at cost. # 19. register with starting balance, valued at cost.
$ hledger -f- reg --value=cost -b 200002 -H $ hledger -f- reg --value=cost -b 200002 -H
2000/02/01 (a) 7 B 13 B 2000-02-01 (a) 7 B 13 B
2000/03/01 (a) 8 B 21 B 2000-03-01 (a) 8 B 21 B
# 20. register with starting balance, valued at period end. # 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. # 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. # Starting balance is 5 B as above.
$ hledger -f- reg --value=end -b 200002 -H $ hledger -f- reg --value=end -b 200002 -H
2000/02/01 (a) 3 B 8 B 2000-02-01 (a) 3 B 8 B
2000/03/01 (a) 3 B 11 B 2000-03-01 (a) 3 B 11 B
# 21. register with starting balance, valued at specified date (when the price is 5 B). # 21. register with starting balance, valued at specified date (when the price is 5 B).
# Starting balance is 5 B as above. # Starting balance is 5 B as above.
$ hledger -f- reg --value=2000-01-15 -b 200002 -H $ hledger -f- reg --value=2000-01-15 -b 200002 -H
2000/02/01 (a) 5 B 10 B 2000-02-01 (a) 5 B 10 B
2000/03/01 (a) 5 B 15 B 2000-03-01 (a) 5 B 15 B
# register, periodic # register, periodic
@ -378,7 +378,7 @@ Balance changes in 2000q1, valued at period ends:
# 35. multicolumn balance report valued at other date # 35. multicolumn balance report valued at other date
$ hledger -f- bal -MTA --value=2000-01-15 $ 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 || Jan Feb Mar Total Average
===++================================= ===++=================================
@ -413,9 +413,9 @@ Balance changes in 2000q1, valued at period ends:
# February adds 1 A costing 7 B, making 13 B. # February adds 1 A costing 7 B, making 13 B.
# March adds 1 A costing 8 B, making 21 B. # March adds 1 A costing 8 B, making 21 B.
$ hledger -f- bal -M -H -b 200002 --value=cost $ hledger -f- bal -M -H -b 200002 --value=cost
Ending balances (historical) in 2000/02/01-2000/03/31, valued at 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 a || 13 B 21 B
---++------------------------ ---++------------------------
@ -426,9 +426,9 @@ Ending balances (historical) in 2000/02/01-2000/03/31, valued at cost:
# February adds 1 A making 2 A, which is valued at 2000/02/29 as 4 B. # February adds 1 A making 2 A, which is valued at 2000/02/29 as 4 B.
# March adds 1 A making 3 A, which is valued at 2000/03/31 as 9 B. # March adds 1 A making 3 A, which is valued at 2000/03/31 as 9 B.
$ hledger -f- bal -MA -H -b 200002 --value=end $ hledger -f- bal -MA -H -b 200002 --value=end
Ending balances (historical) in 2000/02/01-2000/03/31, valued at period ends: 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 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. # 40. multicolumn balance report with -H valued at other date.
# The starting balance is 5 B (1 A valued at 2000/1/15). # The starting balance is 5 B (1 A valued at 2000/1/15).
$ hledger -f- bal -M -H -b 200002 --value=2000-01-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 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 $ hledger -f- bal -ME -H -p200001-200004 --value=c
Ending balances (historical) in 2000q1, valued at cost: 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 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 $ hledger -f- bal -META -H -p200001-200004 --value=e
Ending balances (historical) in 2000q1, valued at period ends: 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 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. # 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 $ 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 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. # 47. budget report, valued at other date.
$ hledger -f- bal -MTA --budget --value=2000-01-15 $ 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 || Jan Feb Mar Total Average
===++========================================================================================================== ===++==========================================================================================================

View File

@ -17,7 +17,7 @@ comment
# 1. normal unvalued output # 1. normal unvalued output
$ hledger -f- print -x $ hledger -f- print -x
2019/06/01 2019-06-01
a 1 B a 1 B
b -1 B b -1 B
@ -25,7 +25,7 @@ $ hledger -f- print -x
# 2. current market value in default valuation commodity # 2. current market value in default valuation commodity
$ hledger -f- print -x -V $ hledger -f- print -x -V
2019/06/01 2019-06-01
a 10 A a 10 A
b -10 A b -10 A
@ -33,7 +33,7 @@ $ hledger -f- print -x -V
# 3. same as above, but request commodity A explicitly # 3. same as above, but request commodity A explicitly
$ hledger -f- print -x --value=now,A $ hledger -f- print -x --value=now,A
2019/06/01 2019-06-01
a 10 A a 10 A
b -10 A b -10 A
@ -41,7 +41,7 @@ $ hledger -f- print -x --value=now,A
# 4. request commodity B - no effect # 4. request commodity B - no effect
$ hledger -f- print -x --value=now,B $ hledger -f- print -x --value=now,B
2019/06/01 2019-06-01
a 1 B a 1 B
b -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 # 5. request commodity we don't have prices for - no effect
$ hledger -f- print -x --value=now,Z $ hledger -f- print -x --value=now,Z
2019/06/01 2019-06-01
a 1 B a 1 B
b -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 because that makes it display as zero, the commodity symbol
# and sign are not shown either. # and sign are not shown either.
$ hledger -f- print -x --value=now,C $ hledger -f- print -x --value=now,C
2019/06/01 2019-06-01
a 0 a 0
b 0 b 0
@ -70,7 +70,7 @@ $ hledger -f- print -x --value=now,C
# # but the precision is increased to show the decimal digit # # but the precision is increased to show the decimal digit
# # (otherwise it would show C0). # # (otherwise it would show C0).
# $ hledger -f- print -x --value=now,C # $ hledger -f- print -x --value=now,C
# 2019/06/01 # 2019-06-01
# a C0.5 # a C0.5
# b C-0.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 # 7. request commodity D - chains B->A, A->D prices
$ hledger -f- print -x --value=now,D $ hledger -f- print -x --value=now,D
2019/06/01 2019-06-01
a 1000 D a 1000 D
b -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. # 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. # As with C above, E gets the default display style, with precision 0.
$ hledger -f- print -x --value=now,E $ hledger -f- print -x --value=now,E
2019/06/01 2019-06-01
a E333 a E333
b E-333 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 # # 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. # # increased to show the decimal digits, but no more than 8.
# $ hledger -f- print -x --value=now,E # $ hledger -f- print -x --value=now,E
# 2019/06/01 # 2019-06-01
# a E333.33333333 # a E333.33333333
# b E-333.33333333 # b E-333.33333333
# #
@ -112,7 +112,7 @@ $ hledger -f- print -x --value=now,E
# 9. Normal print output. # 9. Normal print output.
$ hledger -f- print $ hledger -f- print
2000/01/01 2000-01-01
a -1A @ 1B a -1A @ 1B
b 1B b 1B
@ -120,7 +120,7 @@ $ hledger -f- print
# 10. Valuing in a commodity with no market price has no effect. # 10. Valuing in a commodity with no market price has no effect.
$ hledger -f- print -XZ $ hledger -f- print -XZ
2000/01/01 2000-01-01
a -1A @ 1B a -1A @ 1B
b 1B b 1B
@ -128,7 +128,7 @@ $ hledger -f- print -XZ
# 11. -B converts to the transaction price's commodity. # 11. -B converts to the transaction price's commodity.
$ hledger -f- print -B $ hledger -f- print -B
2000/01/01 2000-01-01
a -1B a -1B
b 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 # 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. # (-B -XZ is equivalent to --value=cost --value=end,Z), and the rightmost wins.
$ hledger -f- print -B -XZ $ hledger -f- print -B -XZ
2000/01/01 2000-01-01
a -1A @ 1B a -1A @ 1B
b 1B b 1B
@ -153,7 +153,7 @@ P 2000/1/1 A 1B
# 13. # 13.
$ hledger -f- print $ hledger -f- print
2000/01/01 2000-01-01
a -1A @ 1B a -1A @ 1B
b 1B b 1B
@ -161,7 +161,7 @@ $ hledger -f- print
# 14. # 14.
$ hledger -f- print -XZ $ hledger -f- print -XZ
2000/01/01 2000-01-01
a -1A @ 1B a -1A @ 1B
b 1B b 1B
@ -169,7 +169,7 @@ $ hledger -f- print -XZ
# 15. # 15.
$ hledger -f- print -B $ hledger -f- print -B
2000/01/01 2000-01-01
a -1B a -1B
b 1B b 1B
@ -177,7 +177,7 @@ $ hledger -f- print -B
# 16. # 16.
$ hledger -f- print -B -XZ $ hledger -f- print -B -XZ
2000/01/01 2000-01-01
a -1A @ 1B a -1A @ 1B
b 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. # 17. -V uses today as the default valuation date, unlike --value=end.
$ hledger -f- reg -V $ 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. # 18. -V uses the report end date, if specified, as valuation date.
$ hledger -f- reg -V -e 2001 $ 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. # 19. In balance reports too.
$ hledger -f- bal -N -V $ hledger -f- bal -N -V

View File

@ -8,7 +8,7 @@ hledger -f- --pivot TAG print
Account2 -2 EUR Account2 -2 EUR
; TAG: value ; TAG: value
>>> >>>
2016/02/16 Test Transaction 2016-02-16 Test Transaction
2 EUR 2 EUR
value -2 EUR value -2 EUR
; TAG: value ; TAG: value
@ -50,7 +50,7 @@ hledger -f- --pivot TAG reg '^Account2$' '^fun$' not:hidden
Account2 -1 EUR Account2 -1 EUR
; TAG: hidden ; 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 value -1 EUR 1 EUR
>>>=0 >>>=0
@ -63,7 +63,7 @@ hledger -f- --pivot expenses reg not:liabilities
assets $5 ; expenses:c assets $5 ; expenses:c
liabilities $-1605 liabilities $-1605
>>> >>>
2017/01/01 prepay a $1500 $1500 2017-01-01 prepay a $1500 $1500
b $100 $1600 b $100 $1600
c $5 $1605 c $5 $1605
>>>=0 >>>=0
@ -97,7 +97,7 @@ hledger -f- --pivot code reg ^income
assets:bank account 2 EUR assets:bank account 2 EUR
income:donations -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 >>>=0
# get expenses balance by description/payee # get expenses balance by description/payee
@ -132,7 +132,7 @@ hledger -f- --pivot payee reg -D ^expense
assets:bank account assets:bank account
expense:grocery 30 EUR expense:grocery 30 EUR
>>> >>>
2016/02/16 Auchan 22 EUR 22 EUR 2016-02-16 Auchan 22 EUR 22 EUR
StarBars 5 EUR 27 EUR StarBars 5 EUR 27 EUR
2016/02/17 Auchan 30 EUR 57 EUR 2016-02-17 Auchan 30 EUR 57 EUR
>>>=0 >>>=0

View File

@ -8,10 +8,10 @@ hledger -f - print
(b) 1 (b) 1
>>> >>>
2000/01/01=2000/03/03 2000-01-01=2000-03-03
(a) 1 (a) 1
2000/01/02=2000/02/02 2000-01-02=2000-02-02
(b) 1 (b) 1
>>>2 >>>2
@ -27,10 +27,10 @@ hledger -f - print --date2
(b) 1 (b) 1
>>> >>>
2000/01/02=2000/02/02 2000-01-02=2000-02-02
(b) 1 (b) 1
2000/01/01=2000/03/03 2000-01-01=2000-03-03
(a) 1 (a) 1
>>>2 >>>2

View File

@ -7,7 +7,7 @@ hledger -f - print
expenses $5 expenses $5
assets assets
>>> >>>
2017/01/01 2017-01-01
expenses $5 expenses $5
assets assets
@ -21,7 +21,7 @@ hledger -f - print --explicit
expenses $5 expenses $5
assets assets
>>> >>>
2017/01/01 2017-01-01
expenses $5 expenses $5
assets $-5 assets $-5
@ -35,7 +35,7 @@ hledger -f - print
expenses 4 EUR expenses 4 EUR
assets $-5 assets $-5
>>> >>>
2017/01/01 2017-01-01
expenses 4 EUR expenses 4 EUR
assets $-5 assets $-5
@ -49,7 +49,7 @@ hledger -f - print --explicit
expenses 4 EUR expenses 4 EUR
assets $-5 assets $-5
>>> >>>
2017/01/01 2017-01-01
expenses 4 EUR @@ $5 expenses 4 EUR @@ $5
assets $-5 assets $-5
@ -63,7 +63,7 @@ hledger -f - print
assets = $100 assets = $100
equity equity
>>> >>>
2017/01/01 2017-01-01
assets = $100 assets = $100
equity equity
@ -77,7 +77,7 @@ hledger -f - print --explicit
assets = $100 assets = $100
equity equity
>>> >>>
2017/01/01 2017-01-01
assets $100 = $100 assets $100 = $100
equity $-100 equity $-100
@ -92,7 +92,7 @@ D 1000.00 EUR
expenses 100 expenses 100
assets assets
>>> >>>
2017/01/01 2017-01-01
expenses 100.00 EUR expenses 100.00 EUR
assets assets
@ -106,7 +106,7 @@ hledger -f - print --explicit
assets $0 assets $0
equity equity
>>> >>>
2017/01/01 2017-01-01
assets 0 assets 0
equity 0 equity 0

View File

@ -4,7 +4,7 @@ hledger -f - print
aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1 aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1
b b
>>> >>>
2009/01/01 x 2009-01-01 x
aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1 aaaaabbbbbcccccdddddeeeeefffffggggghhhhh 1
b b

View File

@ -9,7 +9,7 @@ hledger -f - print desc:x
b b
>>> >>>
2009/01/01 x 2009-01-01 x
a 1 a 1
b b

View File

@ -12,7 +12,7 @@ hledger -f - print
; posting-2-tag-2: ; posting-2-tag-2:
; non-metadata: ; non-metadata:
>>> >>>
2010/01/01 ; txntag1: txn val 1 2010-01-01 ; txntag1: txn val 1
; txntag2: txn val 2 ; txntag2: txn val 2
a 1 a 1
; posting1tag1: posting 1 val 1 ; posting1tag1: posting 1 val 1
@ -38,11 +38,11 @@ hledger -f - print tag:foo
e 1 e 1
f -1 f -1
>>> >>>
2010/01/01 ; foo:bar 2010-01-01 ; foo:bar
a 1 a 1
b -1 b -1
2010/01/02 ; foo:baz 2010-01-02 ; foo:baz
c 1 c 1
d -1 d -1
@ -65,7 +65,7 @@ hledger -f - print tag:foo=bar
e 1 e 1
f -1 f -1
>>> >>>
2010/01/01 ; foo:bar 2010-01-01 ; foo:bar
a 1 a 1
b -1 b -1
@ -87,8 +87,8 @@ hledger -f - register tag:foo=bar
e 1 e 1
f -1 f -1
>>> >>>
2010/01/01 a 1 1 2010-01-01 a 1 1
2010/01/03 e 1 2 2010-01-03 e 1 2
f -1 1 f -1 1
>>>2 >>>2
>>>=0 >>>=0
@ -113,15 +113,15 @@ hledger -f - print not:tag:.
g 4 g 4
h -4 h -4
>>> >>>
2010/01/01 desc 2010-01-01 desc
a 1 a 1
b -1 b -1
2010/01/03 2010-01-03
e 3 e 3
f -3 f -3
2010/01/04 (code) 2010-01-04 (code)
g 4 g 4
h -4 h -4

View File

@ -11,8 +11,8 @@
(a) 1 (a) 1
$ hledger -f- register -A $ hledger -f- register -A
2019/01/01 (a) 1.0 1.0 2019-01-01 (a) 1.0 1.0
2019/01/02 (a) 1.0 1.0 2019-01-02 (a) 1.0 1.0
2019/01/03 (a) 1.0 1.0 2019-01-03 (a) 1.0 1.0
2019/01/04 (a) 1.0 1.0 2019-01-04 (a) 1.0 1.0
>= >=

View File

@ -12,7 +12,7 @@ hledger -f - register --date2
a 1 a 1
b b
>>> >>>
2010/01/01 x a 1 1 2010-01-01 x a 1 1
b -1 0 b -1 0
>>>=0 >>>=0
@ -25,7 +25,7 @@ hledger -f- register -p 2014/1/2 --date2
2014/1/3 2014/1/3
(b) 1 (b) 1
>>> >>>
2014/01/02 (a) 1 1 2014-01-02 (a) 1 1
>>>=0 >>>=0
# 3. --date2 causes date: to match the secondary date # 3. --date2 causes date: to match the secondary date
@ -37,7 +37,7 @@ hledger -f- register date:2014/1/2 --date2
2014/1/3 2014/1/3
(b) 1 (b) 1
>>> >>>
2014/01/02 (a) 1 1 2014-01-02 (a) 1 1
>>>=0 >>>=0
# 4. date2: matches the secondary date (but does not necessarily display it) # 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 2014/1/3
(b) 1 (b) 1
>>> >>>
2014/01/01 (a) 1 1 2014-01-01 (a) 1 1
>>>=0 >>>=0
# 5. date2: plus --date2 both matches and displays the secondary date # 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 2014/1/3
(b) 1 (b) 1
>>> >>>
2014/01/02 (a) 1 1 2014-01-02 (a) 1 1
>>>=0 >>>=0
# 6. date2: matching is not affected by --date2 # 6. date2: matching is not affected by --date2
@ -84,6 +84,6 @@ hledger -f- register --date2
2014/1/3=2/1 2014/1/3=2/1
(b) 1 (b) 1
>>> >>>
2014/02/01 (b) 1 1 2014-02-01 (b) 1 1
2014/02/02 (a) 1 2 2014-02-02 (a) 1 2
>>>=0 >>>=0

View File

@ -5,7 +5,7 @@ hledger -f - register aa --depth 1
a:aa:aaa 1 a:aa:aaa 1
b b
>>> >>>
2010/01/01 x a 1 1 2010-01-01 x a 1 1
>>>=0 >>>=0
# 2. separate postings remain separate # 2. separate postings remain separate
@ -23,9 +23,9 @@ hledger -f - register aa --depth 2
a:aa 1 a:aa 1
b:bb:bbb b:bb:bbb
>>> >>>
2010/01/01 x a:aa 1 1 2010-01-01 x a:aa 1 1
2010/01/01 y a:aa 1 2 2010-01-01 y a:aa 1 2
2010/01/02 z a:aa 1 3 2010-01-02 z a:aa 1 3
>>>=0 >>>=0
# 3. with a reporting interval, all postings are aggregated under each (clipped) account # 3. with a reporting interval, all postings are aggregated under each (clipped) account
@ -43,8 +43,8 @@ hledger -f - register aa --depth 1 --daily
a:aa 1 a:aa 1
b:bb:bbb b:bb:bbb
>>> >>>
2010/01/01 a 2 2 2010-01-01 a 2 2
2010/01/02 a 1 3 2010-01-02 a 1 3
>>>=0 >>>=0
# 4. with --cleared # 4. with --cleared
@ -53,7 +53,7 @@ hledger -f - register a --depth 1 --cleared
2012/1/1 * 2012/1/1 *
(a:aa) 1 (a:aa) 1
>>> >>>
2012/01/01 (a) 1 1 2012-01-01 (a) 1 1
>>>2 >>>2
>>>=0 >>>=0
@ -75,7 +75,7 @@ hledger -f - register --depth 0 --daily a b
b:bb 2 b:bb 2
c:cc c:cc
>>> >>>
2010/01/01 ... 6 6 2010-01-01 ... 6 6
2010/01/02 ... 3 9 2010-01-02 ... 3 9
>>>=0 >>>=0

View File

@ -10,6 +10,6 @@ hledger -f- register date:2014/4
(a) 1 (a) 1
>>> >>>
2014/04/01 (a) 1 1 2014-04-01 (a) 1 1
>>>2 >>>2
>>>= 0 >>>= 0

View File

@ -10,14 +10,14 @@ hledger rewrite -f- ^income --add-posting '(liabilities:tax) *.33 ; income tax
assets:cash $20 assets:cash $20
assets:bank assets:bank
>>> >>>
2016/01/01 paycheck ; modified: 2016-01-01 paycheck ; modified:
income:remuneration $-100 income:remuneration $-100
(liabilities:tax) $-33 ; income tax, generated-posting: = ^income (liabilities:tax) $-33 ; income tax, generated-posting: = ^income
income:donations $-15 income:donations $-15
(liabilities:tax) $-5 ; income tax, generated-posting: = ^income (liabilities:tax) $-5 ; income tax, generated-posting: = ^income
assets:bank assets:bank
2016/01/01 withdraw 2016-01-01 withdraw
assets:cash $20 assets:cash $20
assets:bank assets:bank
@ -36,14 +36,14 @@ hledger rewrite -f- expenses:gifts --add-posting '(budget:gifts) *-1'
assets:cash $-15 assets:cash $-15
expenses:gifts ; [1/2] expenses:gifts ; [1/2]
>>> >>>
2016/01/01 withdraw 2016-01-01 withdraw
assets:cash $20 assets:cash $20
assets:bank assets:bank
2016/01/01 gift ; modified: 2016-01-01 gift ; modified:
assets:cash $-15 assets:cash $-15
expenses:gifts ; [1/2] 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 >>>2
>>>=0 >>>=0
@ -67,15 +67,15 @@ hledger rewrite -f-
= ^assets:unbilled:client2 = ^assets:unbilled:client2
(assets:to bill:client2) *150.00 CAD (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:unbilled:client1) 0.42h
(assets:to bill:client1) 42.00 CAD ; generated-posting: = ^assets:unbilled:client1 (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:unbilled:client1) 1.25h
(assets:to bill:client1) 125.00 CAD ; generated-posting: = ^assets:unbilled:client1 (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:unbilled:client2) 1.54h
(assets:to bill:client2) 231.00 CAD ; generated-posting: = ^assets:unbilled:client2 (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 assets:to bill:client2 *1.00 hours @ $150.00
income:consulting:client2 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:unbilled:client1) 0.42h
assets:to bill:client1 $42.00 ; generated-posting: = ^assets:unbilled:client1 assets:to bill:client1 $42.00 ; generated-posting: = ^assets:unbilled:client1
income:consulting:client1 ; 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:unbilled:client1) 1.25h
assets:to bill:client1 $125.00 ; generated-posting: = ^assets:unbilled:client1 assets:to bill:client1 $125.00 ; generated-posting: = ^assets:unbilled:client1
income:consulting:client1 ; 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:unbilled:client2) 1.54h
assets:to bill:client2 $231.00 ; generated-posting: = ^assets:unbilled:client2 assets:to bill:client2 $231.00 ; generated-posting: = ^assets:unbilled:client2
income:consulting:client2 ; 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 # income:remuneration $-100
# assets:bank # assets:bank
>>> >>>
2016/01/01 withdraw ; modified: 2016-01-01 withdraw ; modified:
assets:cash $20 assets:cash $20
assets:bank assets:bank
expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"
assets:bank $-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:cash
assets:bank $-30 assets:bank $-30
expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" 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 = ^expenses not:housing not:grocery not:food
(budget:misc) *-1 (budget:misc) *-1
>>> >>>
2016/12/31 ; modified: 2016-12-31 ; modified:
expenses:housing $600.00 expenses:housing $600.00
(budget:housing) $-600.00 ; generated-posting: = ^expenses:housing (budget:housing) $-600.00 ; generated-posting: = ^expenses:housing
assets:cash assets:cash
2017/01/01 ; modified: 2017-01-01 ; modified:
expenses:food $20.00 expenses:food $20.00
(budget:food) $-20.00 ; generated-posting: = ^expenses:grocery ^expenses:food (budget:food) $-20.00 ; generated-posting: = ^expenses:grocery ^expenses:food
Here comes Santa 0 ; generated-posting: = date:2017/1 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 assets:cash
Here comes Santa 0 ; generated-posting: = date:2017/1 Here comes Santa 0 ; generated-posting: = date:2017/1
2017/01/02 ; modified: 2017-01-02 ; modified:
assets:cash $200.00 assets:cash $200.00
Here comes Santa 0 ; generated-posting: = date:2017/1 Here comes Santa 0 ; generated-posting: = date:2017/1
assets:bank 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 (budget:misc) $-1.60 ; generated-posting: = ^expenses not:housing not:grocery not:food
Here comes Santa 0 ; generated-posting: = date:2017/1 Here comes Santa 0 ; generated-posting: = date:2017/1
2017/02/01 2017-02-01
assets:cash $100.00 assets:cash $100.00
assets:bank assets:bank
@ -237,14 +237,14 @@ hledger rewrite --diff -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee
+++ - +++ -
@@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
-2016/01/01 withdraw -2016/01/01 withdraw
+2016/01/01 withdraw ; modified: +2016-01-01 withdraw ; modified:
assets:cash $20 assets:cash $20
assets:bank assets:bank
+ expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" + expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"
+ assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0" + assets:bank $-5 ; generated-posting: = assets:bank and "amt:<0"
@@ -5,3 +7,5 @@ @@ -5,3 +7,5 @@
-2016/01/02 withdraw -2016/01/02 withdraw
+2016/01/02 withdraw ; modified: +2016-01-02 withdraw ; modified:
assets:cash assets:cash
assets:bank $-30 assets:bank $-30
+ expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0" + expenses:fee $5 ; generated-posting: = assets:bank and "amt:<0"

View File

@ -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 | | || 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 >>>=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 | | || 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 >>>=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 | | || 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 >>>=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 | | || 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 >>>=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 | | || 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 >>>=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 | | || 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% | | 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% | | 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% | | 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% | | 4 || 2017-10-01 | 2017-12-31 || 210 | -50 | 155 | -5 || -11.83% | -11.82% |
+---++------------+------------++---------------+----------+-------------+-----++---------+---------+ +---++------------+------------++---------------+----------+-------------+-----++---------+---------+
>>>=0 >>>=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 | | || 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 >>>=0
@ -221,7 +221,7 @@ hledger -f- roi -p 2019-11
+---++------------+------------++---------------+----------+-------------+-----++-------+-------+ +---++------------+------------++---------------+----------+-------------+-----++-------+-------+
| || Begin | End || Value (begin) | Cashflow | Value (end) | PnL || IRR | TWR | | || 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 >>>=0

View File

@ -9,13 +9,13 @@ o 2009/1/2 09:00:00
i 2009/1/3 08:00:00 some:account name and a description i 2009/1/3 08:00:00 some:account name and a description
o 2009/1/3 09:00:00 o 2009/1/3 09:00:00
>>> >>>
2009/01/01 * 08:00-09:00 2009-01-01 * 08:00-09:00
() 1.00h () 1.00h
2009/01/02 * 08:00-09:00 2009-01-02 * 08:00-09:00
(account name) 1.00h (account name) 1.00h
2009/01/03 * and a description 2009-01-03 * and a description
(some:account name) 1.00h (some:account name) 1.00h
>>>2 >>>2
@ -46,25 +46,25 @@ o 2009/1/3 09:00:00
#i 2017/04/22 09:00:00 C #i 2017/04/22 09:00:00 C
#o 2017/04/22 17:00:00 #o 2017/04/22 17:00:00
#>>> #>>>
#2017/04/20 * 09:00-17:00 #2017-04-20 * 09:00-17:00
# (A) 8.00h # (A) 8.00h
# #
#2017/04/21 * 09:00-23:59 #2017-04-21 * 09:00-23:59
# (B) 15.00h # (B) 15.00h
# #
#2017/04/22 * 00:00-09:00 #2017-04-22 * 00:00-09:00
# (B) 9.00h # (B) 9.00h
# #
#2017/04/22 * 17:00-23:59 #2017-04-22 * 17:00-23:59
# () 7.00h # () 7.00h
# #
#2017/04/23 * 00:00-23:59 #2017-04-23 * 00:00-23:59
# () 24.00h # () 24.00h
# #
#2017/04/24 * 00:00-23:59 #2017-04-24 * 00:00-23:59
# () 24.00h # () 24.00h
# #
#2017/04/25 * 00:00-11:28 #2017-04-25 * 00:00-11:28
# () 11.47h # () 11.47h
# #
#>>>2 #>>>2