From c4602ef73495951e08d937f988594006b53289f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 1 Dec 2023 17:13:47 +0100 Subject: [PATCH] Fix relativeTimeFromDate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- NextcloudTalk/NCUtils.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NextcloudTalk/NCUtils.swift b/NextcloudTalk/NCUtils.swift index 6516e4c1d..bcddd4f9f 100644 --- a/NextcloudTalk/NCUtils.swift +++ b/NextcloudTalk/NCUtils.swift @@ -196,15 +196,15 @@ import UniformTypeIdentifiers return NSLocalizedString("less than a minute ago", comment: "") } else if ti < 3600 { // This hour - let diff = round(ti / 60) + let diff = Int(round(ti / 60)) return String(format: NSLocalizedString("%d minutes ago", comment: ""), diff) } else if ti < 86400 { // This day - let diff = round(ti / 60 / 60) + let diff = Int(round(ti / 60 / 60)) return String(format: NSLocalizedString("%d hours ago", comment: ""), diff) } else if ti < 86400 * 30 { // This month - let diff = round(ti / 60 / 60 / 24) + let diff = Int(round(ti / 60 / 60 / 24)) return String(format: NSLocalizedString("%d days ago", comment: ""), diff) }