aboutsummaryrefslogtreecommitdiff
path: root/foray/Coordinators
diff options
context:
space:
mode:
Diffstat (limited to 'foray/Coordinators')
-rw-r--r--foray/Coordinators/ForayCoordinator.swift6
1 files changed, 2 insertions, 4 deletions
diff --git a/foray/Coordinators/ForayCoordinator.swift b/foray/Coordinators/ForayCoordinator.swift
index 6497ec0..6c4bb3f 100644
--- a/foray/Coordinators/ForayCoordinator.swift
+++ b/foray/Coordinators/ForayCoordinator.swift
@@ -33,7 +33,7 @@ class ForayCoordinator: Coordinator {
let detailViewController = ForayDetailViewController()
- func showDetails(item: PenguinItem) {
+ func showDetails(item: PenguinItemViewModel) {
let image: UIImage
var description: String = "Type: "
switch item.type {
@@ -45,9 +45,7 @@ class ForayCoordinator: Coordinator {
image = UIImage(named: "spy")!
}
description += "\nID: " + item.id
- let dateFormatter = DateFormatter()
- dateFormatter.dateFormat = "yyyy-MM-dd"
- description += "\nReleased: " + dateFormatter.string(from: item.releaseDate)
+ description += "\nReleased: " + item.releaseDateFormatted
detailViewController.setDetails(name: item.name, description: description, image: image)
push(vc: detailViewController)