From 61086e8b1d971ca25cdddfa8a1c7253adb2e3af8 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 27 Sep 2022 15:41:41 -0500 Subject: [PATCH] =?UTF-8?q?Displays=20=E2=80=9CTODAY=E2=80=9D=20as=20secti?= =?UTF-8?q?on=20header=20for=20logged=20errors=20that=20occured=20that=20d?= =?UTF-8?q?ay?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Settings/Error Log/ErrorLogViewController.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/AltStore/Settings/Error Log/ErrorLogViewController.swift b/AltStore/Settings/Error Log/ErrorLogViewController.swift index a2c34a36..c0f7fa27 100644 --- a/AltStore/Settings/Error Log/ErrorLogViewController.swift +++ b/AltStore/Settings/Error Log/ErrorLogViewController.swift @@ -287,8 +287,15 @@ extension ErrorLogViewController override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { let indexPath = IndexPath(row: 0, section: section) - let loggedError = self.dataSource.item(at: indexPath) - return loggedError.localizedDateString + + if Calendar.current.isDateInToday(loggedError.date) + { + return NSLocalizedString("Today", comment: "") + } + else + { + return loggedError.localizedDateString + } } }