From 57d9cff264066a3a7dd8c2d2eaa9fe3beab65aaf Mon Sep 17 00:00:00 2001 From: mike-dydx Date: Tue, 7 Nov 2023 18:25:11 -0500 Subject: [PATCH] format good til as a time. do "-" if created at is unavailable --- .../dydxFormatter/dydxFormatter.swift | 3 +++ .../OrderDetails/dydxOrderDetailsViewBuilder.swift | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dydx/dydxFormatter/dydxFormatter/dydxFormatter.swift b/dydx/dydxFormatter/dydxFormatter/dydxFormatter.swift index d7dd786c7..d0fc94584 100644 --- a/dydx/dydxFormatter/dydxFormatter/dydxFormatter.swift +++ b/dydx/dydxFormatter/dydxFormatter/dydxFormatter.swift @@ -571,6 +571,9 @@ public final class dydxFormatter: NSObject, SingletonProtocol { } } + /// returns a formatted date in the form `M/D/YY, H:MM PM/AM` + /// + /// e.g. `12/5/23, 6:02 PM` public func dateAndTime(date: Date?) -> String? { if let date = date { return datetimeFormatter.string(from: date) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/OrderDetails/dydxOrderDetailsViewBuilder.swift b/dydx/dydxPresenters/dydxPresenters/_v4/OrderDetails/dydxOrderDetailsViewBuilder.swift index 019eaedb5..5ed69e157 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/OrderDetails/dydxOrderDetailsViewBuilder.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/OrderDetails/dydxOrderDetailsViewBuilder.swift @@ -132,19 +132,21 @@ private class dydxOrderDetailsViewPresenter: HostedViewPresenter