diff options
author | uvok | 2025-04-17 18:42:26 +0200 |
---|---|---|
committer | uvok | 2025-04-17 18:42:26 +0200 |
commit | acedaf85eb6305e6dddf9aa6d318bfc7db289a72 (patch) | |
tree | 2bcb588cda05d196124846f0dc71840d28caed91 /ledger_action.py | |
parent | 9627c4426614d5ad9d57f56e93ba5c53e10ed387 (diff) |
Include full timestamp in LedgerAction
Diffstat (limited to 'ledger_action.py')
-rw-r--r-- | ledger_action.py | 8 |
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] |