From fb2b92c381cdbd6696f9bea37de82f990b307edd Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 24 Jan 2021 16:37:21 -0500 Subject: [PATCH] Adjusted autoformatting of TimeInterval string Removed unneccessary zeroes. --- ProjectClock/Utils.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ProjectClock/Utils.swift b/ProjectClock/Utils.swift index 5edb7d6..34a064a 100644 --- a/ProjectClock/Utils.swift +++ b/ProjectClock/Utils.swift @@ -76,6 +76,7 @@ extension TimeInterval { if days != 0 { return "\(days)d \(hours)h \(minutes)m \(seconds)s" } else if hours != 0 { return "\(hours)h \(minutes)m \(seconds)s" } + else if days != 0 && hours == 0 { return "\(days)d \(minutes)m \(seconds)s"} else if minutes != 0 { return "\(minutes)m \(seconds)s" } else { return "\(seconds)s" } }