Stabilize beta release with warning cleanup and edge-case fixes
This commit is contained in:
@@ -298,16 +298,9 @@ final class ScenarioBPlanner: ScenarioPlanner {
|
||||
to: lastGameDate
|
||||
).day ?? 0
|
||||
|
||||
// If selected games span more days than trip duration, can't fit
|
||||
// If selected games span more days than trip duration, no valid window exists.
|
||||
if gameSpanDays >= duration {
|
||||
// Just return one window that exactly covers the games
|
||||
let start = firstGameDate
|
||||
let end = Calendar.current.date(
|
||||
byAdding: .day,
|
||||
value: gameSpanDays + 1,
|
||||
to: start
|
||||
) ?? lastGameDate
|
||||
return [DateInterval(start: start, end: end)]
|
||||
return []
|
||||
}
|
||||
|
||||
// Generate sliding windows
|
||||
|
||||
Reference in New Issue
Block a user