diff --git a/hledger-lib/Hledger/Data/PeriodicTransaction.hs b/hledger-lib/Hledger/Data/PeriodicTransaction.hs index 528960020..70bbe8cef 100644 --- a/hledger-lib/Hledger/Data/PeriodicTransaction.hs +++ b/hledger-lib/Hledger/Data/PeriodicTransaction.hs @@ -76,107 +76,107 @@ instance Show PeriodicTransaction where -- -- >>> _ptgen "monthly from 2017/1 to 2017/4" -- 2017/01/01 --- ; recur: monthly from 2017/1 to 2017/4 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/4 -- a $1.00 -- -- 2017/02/01 --- ; recur: monthly from 2017/1 to 2017/4 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/4 -- a $1.00 -- -- 2017/03/01 --- ; recur: monthly from 2017/1 to 2017/4 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/4 -- a $1.00 -- -- -- >>> _ptgen "monthly from 2017/1 to 2017/5" -- 2017/01/01 --- ; recur: monthly from 2017/1 to 2017/5 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/02/01 --- ; recur: monthly from 2017/1 to 2017/5 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/03/01 --- ; recur: monthly from 2017/1 to 2017/5 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/04/01 --- ; recur: monthly from 2017/1 to 2017/5 +-- ; generated-transaction:~ monthly from 2017/1 to 2017/5 -- a $1.00 -- -- -- >>> _ptgen "every 2nd day of month from 2017/02 to 2017/04" -- 2017/01/02 --- ; recur: every 2nd day of month from 2017/02 to 2017/04 +-- ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04 -- a $1.00 -- -- 2017/02/02 --- ; recur: every 2nd day of month from 2017/02 to 2017/04 +-- ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04 -- a $1.00 -- -- 2017/03/02 --- ; recur: every 2nd day of month from 2017/02 to 2017/04 +-- ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04 -- a $1.00 -- -- -- >>> _ptgen "every 30th day of month from 2017/1 to 2017/5" -- 2016/12/30 --- ; recur: every 30th day of month from 2017/1 to 2017/5 +-- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/01/30 --- ; recur: every 30th day of month from 2017/1 to 2017/5 +-- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/02/28 --- ; recur: every 30th day of month from 2017/1 to 2017/5 +-- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/03/30 --- ; recur: every 30th day of month from 2017/1 to 2017/5 +-- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 -- a $1.00 -- -- 2017/04/30 --- ; recur: every 30th day of month from 2017/1 to 2017/5 +-- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5 -- a $1.00 -- -- -- >>> _ptgen "every 2nd Thursday of month from 2017/1 to 2017/4" -- 2016/12/08 --- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 +-- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 -- a $1.00 -- -- 2017/01/12 --- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 +-- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 -- a $1.00 -- -- 2017/02/09 --- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 +-- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 -- a $1.00 -- -- 2017/03/09 --- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 +-- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4 -- a $1.00 -- -- -- >>> _ptgen "every nov 29th from 2017 to 2019" -- 2016/11/29 --- ; recur: every nov 29th from 2017 to 2019 +-- ; generated-transaction:~ every nov 29th from 2017 to 2019 -- a $1.00 -- -- 2017/11/29 --- ; recur: every nov 29th from 2017 to 2019 +-- ; generated-transaction:~ every nov 29th from 2017 to 2019 -- a $1.00 -- -- 2018/11/29 --- ; recur: every nov 29th from 2017 to 2019 +-- ; generated-transaction:~ every nov 29th from 2017 to 2019 -- a $1.00 -- -- -- >>> _ptgen "2017/1" -- 2017/01/01 --- ; recur: 2017/1 +-- ; generated-transaction:~ 2017/1 -- a $1.00 -- -- diff --git a/hledger-lib/Hledger/Data/TransactionModifier.hs b/hledger-lib/Hledger/Data/TransactionModifier.hs index 84103cef4..99fb64f4d 100644 --- a/hledger-lib/Hledger/Data/TransactionModifier.hs +++ b/hledger-lib/Hledger/Data/TransactionModifier.hs @@ -57,7 +57,7 @@ modifyTransactions tmods = map applymods -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} -- 0000/01/01 -- ping $1.00 --- pong $2.00 +-- pong $2.00 ; generated-posting:= -- -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "miss" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} -- 0000/01/01 @@ -66,7 +66,7 @@ modifyTransactions tmods = map applymods -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "ping" ["pong" `post` amount{aismultiplier=True, aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]} -- 0000/01/01 -- ping $2.00 --- pong $6.00 +-- pong $6.00 ; generated-posting:= ping -- -- transactionModifierToFunction :: TransactionModifier -> (Transaction -> Transaction)