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 +}