How to specify date format in python ledger module?

12 views
Skip to first unread message

Ra Wa

unread,
Oct 11, 2019, 6:43:59 PM10/11/19
to Ledger

I had an idea for duplicate transaction handling so tried to use the python module but am failing at the first step due to my date format not being recognized.

>>> import ledger

>>>  x=ledger.read_journal('ledger.dat')


While parsing file "ledger.dat", line 5:
While parsing transaction:
> 25/07/2019 PAYMENT BY AUTHORITY TO PAYPAL
Error: Year is out of valid range: 1400..10000

I have  --date-format=%d/%m/%Y  in my .ledgerrc file to deal with this but the python module does not appear to read this.

Is there a way to specify such options  to the read_journal() function in python?
 


Reply all
Reply to author
Forward
0 new messages