From b559b7bd9e1c7702f8f308fc1523e83431179a70 Mon Sep 17 00:00:00 2001 From: Shaun Donnelly Date: Mon, 14 Jul 2025 12:50:02 +0100 Subject: [PATCH] Update Extensions.swift --- Sources/Extensions/Extensions.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Sources/Extensions/Extensions.swift b/Sources/Extensions/Extensions.swift index c142fa8..1a0d5be 100644 --- a/Sources/Extensions/Extensions.swift +++ b/Sources/Extensions/Extensions.swift @@ -9,6 +9,9 @@ extension Array { extension Calendar { func isDateInTomorrow(_ date: Date) -> Bool { - return isDate(date, inSameDayAs: Date().addingTimeInterval(86400)) + guard let tomorrow = Self.current.date(byAdding: DateComponents(day: 1), to: Date()) else { + return false + } + return isDate(date, inSameDayAs: tomorrow) } -} \ No newline at end of file +}