Use correct date formatting for ledger output.

This commit is contained in:
Chris Berkhout 2021-04-20 12:40:02 +02:00
parent 13c7f04d97
commit 64d7591a65

View file

@ -4,7 +4,7 @@ class Ledger():
lines = []
for price in prices:
date = str(price.date).translate(str.maketrans('-','/'))
lines.append(f"P {price.date} 00:00:00 {price.base} {price.amount} {price.quote}")
lines.append(f"P {date} 00:00:00 {price.base} {price.amount} {price.quote}")
return "\n".join(lines)
# TODO support additional details of the format: