I was happily using an old version (about 2.5 from memory) of ledger on 
windows XP/ cygwin until my hard disk died.  I kept my data but lost the 
binaries.

I'm re-installing cygwin and ledger on Windows 7 but I'm finding that it 
totally ignores the "--input-date-format" either in .ledgerrc or on the 
command line.

Initially I built the RELEASE version from github source (2.6.3) but I've 
subsequently tried v 2.6.1 from the windows binary at 
https://github.com/ledger/ledger/downloads for the same result.

Both these seem to completely ignore --input-date-format either in 
.ledgerrc or on the command line.  This has me completely baffled as  I 
find it hard to believe that such a bug (if it is a bug) has gone 
unreported for so long.


Below is session output to illustrate the problem. Notice how the date gets 
interpreted as '%y/%m/%d' regardless of the input date settings and 
regardless that this doesn't  match the supplied string without some 
arbitrary truncation.

I saw some traffic on similar issues for later versions- is it fixed in 
CURRENT or BETA branches?

regards
Ra


$ ledger --version
Ledger 2.6.3, the command-line accounting tool

Copyright (c) 2003-2009, John Wiegley.  All rights reserved.

This program is made available under the terms of the BSD Public License.
See LICENSE file included with the distribution for details and disclaimer.

(modules: gmp, pcre, xml)

$ cat try2.txt
16/07/2013  Dividend
    Income:Taxable            $-1133.67  ; 93 c/share fully franked at 30%
    Assets:Bank



$ ledger -f try2.txt print

20/07/2016 Dividend
    Income:Taxable                       $-1133.67    ; 93 c/share fully 
franked at 30%
    Assets:Bank                                     

$ cat ~/.ledgerrc
--cache=/tmp/.ledger.cache
--input-date-format=%d/%m/%Y
--date-format=%d/%m/%Y


$ ledger --input-date-format %m/%d/%Y -f try2.txt print

20/07/2016 Dividend
    Income:Taxable                       $-1133.67    ; 93 c/share fully 
franked at 30%
    Assets:Bank                                     

$ ledger --input-date-format %d/%m/%Y -f try2.txt print

20/07/2016 Dividend
    Income:Taxable                       $-1133.67    ; 93 c/share fully 
franked at 30%
    Assets:Bank                                     

$ ledger --input-date-format %d -f try2.txt print

20/07/2016 Dividend
    Income:Taxable                       $-1133.67    ; 93 c/share fully 
franked at 30%
    Assets:Bank   

$ ledger --date-format %Y/%m/%d -f try2.txt print

2016/07/20 Dividend
    Income:Taxable                       $-1133.67    ; 93 c/share fully 
franked at 30%
    Assets:Bank                                     
 

  

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to