Skip to content

Commit

Permalink
If date is today, use today instead of todays date
Browse files Browse the repository at this point in the history
  • Loading branch information
feliciaan committed Nov 26, 2015
1 parent 1a83ceb commit 1a0dc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iOS/Hydra/HomeActivityCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)!))"
Expand Down Expand Up @@ -58,5 +59,4 @@ class HomeActivityCollectionViewCell: UICollectionViewCell {
}
}
}

}

0 comments on commit 1a0dc5a

Please sign in to comment.