diff --git a/Projects/App/iOS/Support/Info.plist b/Projects/App/iOS/Support/Info.plist index fa53336..83c167e 100644 --- a/Projects/App/iOS/Support/Info.plist +++ b/Projects/App/iOS/Support/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 11.2 + 11.3 CFBundleURLTypes @@ -32,7 +32,7 @@ CFBundleVersion - 83 + 84 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/Projects/Feature/TimeTableFeature/Sources/Weekly/WeeklyTimeTableCore.swift b/Projects/Feature/TimeTableFeature/Sources/Weekly/WeeklyTimeTableCore.swift index d454599..a8fc2a9 100644 --- a/Projects/Feature/TimeTableFeature/Sources/Weekly/WeeklyTimeTableCore.swift +++ b/Projects/Feature/TimeTableFeature/Sources/Weekly/WeeklyTimeTableCore.swift @@ -102,12 +102,10 @@ public struct WeeklyTimeTableCore: Reducer { let calendar = Calendar.autoupdatingCurrent let baseDate = state.displayDate - let normalizedBaseDate = calendar.startOfDay(for: baseDate) - let weekday = calendar.component(.weekday, from: normalizedBaseDate) - let daysFromMonday = (weekday + 5) % 7 - let mondayDate = - calendar.date(byAdding: .day, value: -daysFromMonday, to: normalizedBaseDate) - ?? normalizedBaseDate + let components = calendar.dateComponents([.yearForWeekOfYear, .weekOfYear], from: baseDate) + var adjustedComponents = components + adjustedComponents.weekday = 2 + let mondayDate = calendar.date(from: adjustedComponents) ?? baseDate return .concatenate( .cancel(id: CancellableID.fetch),