bugfix(App IDs, My Apps): calculate in correct direction in time (we aren't time travelers)

This commit is contained in:
junepark678
2023-11-25 13:34:23 +09:00
committed by nythepegasus
parent b3d5d976b4
commit cf373634d7
2 changed files with 4 additions and 4 deletions

View File

@@ -98,11 +98,11 @@ private extension AppIDsViewController
formatter.allowedUnits = [.minute, .hour, .day]
cell.bannerView.button.setTitle(formatter.string(from: expirationDate, to: Date())?.uppercased(), for: .normal)
cell.bannerView.button.setTitle(formatter.string(from: Date(), to: expirationDate)?.uppercased(), for: .normal)
formatter.includesTimeRemainingPhrase = true
attributedAccessibilityLabel.mutableString.append((formatter.string(from: expirationDate, to: Date()) ?? NSLocalizedString("Unknown", comment: "")) + " ")
attributedAccessibilityLabel.mutableString.append((formatter.string(from: Date(), to: expirationDate) ?? NSLocalizedString("Unknown", comment: "")) + " ")
}
else
{