From 18d3739e01f99f23ec320054f2c320147e888616 Mon Sep 17 00:00:00 2001 From: Byung jin Date: Tue, 7 Nov 2023 16:47:54 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=202=EC=9E=90=EB=A6=AC?= =?UTF-8?q?=EC=88=98=20=EC=9D=BC=EB=8F=84=20=EB=8C=80=EC=9D=91=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sources/Scene/MealDetail/MealDetailViewModel.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application/Sources/Scene/MealDetail/MealDetailViewModel.swift b/Application/Sources/Scene/MealDetail/MealDetailViewModel.swift index 1a5281b6..2ee71388 100644 --- a/Application/Sources/Scene/MealDetail/MealDetailViewModel.swift +++ b/Application/Sources/Scene/MealDetail/MealDetailViewModel.swift @@ -27,7 +27,8 @@ class MealDetailViewModel: ObservableObject { private func calculateDateToShowData(allMenu: [MealMenuPerDayEntity]) -> Int { let today = Calendar.current.startOfDay(for: Date()) return allMenu.firstIndex { - let day = $0.date.filter { Int(String($0)) != nil }.suffix(1) + let day = $0.date.split(separator: "월")[1].filter { Int(String($0)) != nil } + print(day) return Int(String(day)) ?? 0 >= Int(today.toString(format: "d")) ?? 0 } ?? 0 }