summaryrefslogtreecommitdiff
path: root/ledger_action.py
diff options
context:
space:
mode:
Diffstat (limited to 'ledger_action.py')
-rw-r--r--ledger_action.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ledger_action.py b/ledger_action.py
index cc0eb83..9879c1b 100644
--- a/ledger_action.py
+++ b/ledger_action.py
@@ -15,7 +15,7 @@ class LedgerAction:
asset (str): The cryptocurrency or fiat asset associated with the action.
amount (Decimal): The amount involved in the action. Positive for deposits, negative for withdrawals.
fee (Decimal): The transaction fee (if applicable).
- date (str): The date of the action in string format (typically "YYYY-MM-DD").
+ timestamp (str): The date of the action in string format (typically "YYYY-MM-DD HH:mm:ss").
refid (str): A reference ID used to group related rows (e.g., EUR-crypto trades).
"""
@@ -23,5 +23,9 @@ class LedgerAction:
asset: str
amount: Decimal
fee: Decimal
- date: str
+ timestamp: str
refid: str
+
+ @property
+ def date(self) -> str:
+ return self.timestamp.split(" ")[0]