From acedaf85eb6305e6dddf9aa6d318bfc7db289a72 Mon Sep 17 00:00:00 2001 From: uvok Date: Thu, 17 Apr 2025 18:42:26 +0200 Subject: Include full timestamp in LedgerAction --- ledger_action.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ledger_action.py') 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] -- cgit v1.2.3