From 1a0dc5ac19b2dc49e9e8677e2d4f1ff2c012c265 Mon Sep 17 00:00:00 2001 From: Feliciaan De Palmenaer Date: Thu, 26 Nov 2015 12:33:08 +0100 Subject: [PATCH] If date is today, use today instead of todays date --- iOS/Hydra/HomeActivityCollectionViewCell.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS/Hydra/HomeActivityCollectionViewCell.swift b/iOS/Hydra/HomeActivityCollectionViewCell.swift index 014702ea..faf00954 100644 --- a/iOS/Hydra/HomeActivityCollectionViewCell.swift +++ b/iOS/Hydra/HomeActivityCollectionViewCell.swift @@ -25,6 +25,7 @@ class HomeActivityCollectionViewCell: UICollectionViewCell { let dateEndFormatter = NSDateFormatter.H_dateFormatterWithAppLocale() titleLabel.text = activity?.title dateEndFormatter.dateFormat = "H:mm"; + if (self.activity!.end != nil) { if self.activity!.start.dateByAddingDays(1).isLaterThanDate(self.activity!.end) { dateLabel.text = "\(dateStartFormatter.stringFromDate((self.activity?.start)!)) - \(dateEndFormatter.stringFromDate((self.activity?.end)!))" @@ -58,5 +59,4 @@ class HomeActivityCollectionViewCell: UICollectionViewCell { } } } - } \ No newline at end of file