From 506d8b41ce7d69ae18d507332a59256ede0ae4b0 Mon Sep 17 00:00:00 2001 From: Cristian A Monterroza <1240948+rismay@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:20:20 -0800 Subject: [PATCH] Update Event.swift --- Sources/WrkstrmFoundation/Collections/Event.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/WrkstrmFoundation/Collections/Event.swift b/Sources/WrkstrmFoundation/Collections/Event.swift index 6dc4065..ac6f1a6 100644 --- a/Sources/WrkstrmFoundation/Collections/Event.swift +++ b/Sources/WrkstrmFoundation/Collections/Event.swift @@ -35,6 +35,14 @@ extension Calendar { start = startDate end = Date(timeIntervalSinceNow: start.timeIntervalSinceNow + 100_000) } + + /// Default initializer with a start and end date for an event. + /// - Parameter start: The starting date of the event. + /// - Parameter end: The ending date of the event. + public init(start: Date, end: Date) { + self.start = start + self.end = end + } /// Determines if the event overlaps with another event, considering an optional gap. /// - Parameters: