Use relative time to present last updated time

This commit is contained in:
yishilin14 2017-03-02 00:06:27 +08:00
parent 98b01d16cf
commit 8798be65b5
2 changed files with 18 additions and 7 deletions

View file

@ -300,8 +300,8 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
footerLabel.numberOfLines = 0
footerLabel.font = UIFont.preferredFont(forTextStyle: .footnote)
footerLabel.textColor = UIColor.gray
let dateString = PasswordStore.shared.getLatestCommitDate(filename: (passwordEntity?.rawPath)!)
footerLabel.text = "Last Updated: \(dateString ?? "Unknown")"
let dateString = PasswordStore.shared.getLatestUpdateInfo(filename: (passwordEntity?.rawPath)!)
footerLabel.text = "Last Updated: \(dateString)"
view.addSubview(footerLabel)
return view
}