From b2b11b17bd67b78e9111f91d9d72b13eb5a565b6 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 26 Jul 2020 19:05:09 +0200 Subject: [PATCH] Implemented displaying value date --- .../ui/views/AccountTransactionListItem.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionListItem.swift index ba2f4d97..68ab3c16 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionListItem.swift @@ -4,6 +4,15 @@ import BankingUiSwift struct AccountTransactionListItem: View { + private static var ValueDateFormat: DateFormatter = { + let formatter = DateFormatter() + + formatter.dateStyle = .short + + return formatter + }() + + let transaction: AccountTransaction @@ -23,8 +32,11 @@ struct AccountTransactionListItem: View { Spacer() VStack(alignment: .trailing) { - Text(self.presenter.formatAmount(amount: transaction.amount)) - //Text(transaction.valueDate) + Text(presenter.formatAmount(amount: transaction.amount)) + + Spacer() + + Text(Self.ValueDateFormat.string(from: transaction.valueDate.date)) } } }