Here's something I would like to open up for discussion.

Suppose I have the ledger file example1.txt (attached)
--- begin ---
2008/01/01 * Purchase Apple shares
        Equities        1000 AAPL @ $2
        Cash

2008/06/30 * Sell some Apple shares
        Equities        -500 AAPL @ $2.5
        Cash

P 2008/10/01 02:18:02 AAPL $3
P 2009/01/31 02:18:02 AAPL $4
P 3000/01/01 02:18:02 APPL $100
--- end ---


At end of 2008, I have 500 AAPL shares.

If I type
   ledger -f example01.txt --end 2008/12/31 -JV bal Equities
I get the output:
   2009-03-29 2000
I would argue that the output should be
   2008-12-31 1500
My argument is that if I specify an end date, then I want ledger to
assume that the current date is the end date I specify, and perform
all reports and calculations on that basis. After all, if you stick
with the current implementation, it could easily mess up any
historical reporting you try to do.

Comments?

PS Actually, I might even be tempted to have a go at making the
changes to the code myself, once we've agreed a way forward.
Fortunately, the change looks within my meager programming abilities.
2008/01/01 * Purchase Apple shares
        Equities        1000 AAPL @ $2
        Cash

2008/06/30 * Sell some Apple shares
        Equities        -500 AAPL @ $2.5
        Cash

P 2008/10/01 02:18:02 AAPL $3
P 2009/01/31 02:18:02 AAPL $4
P 3000/01/01 02:18:02 APPL $100

Reply via email to