diff --git a/server/src/restaurants.ts b/server/src/restaurants.ts index 800450e..efb39d4 100644 --- a/server/src/restaurants.ts +++ b/server/src/restaurants.ts @@ -403,11 +403,13 @@ export const getMenuSenkSerikova = async (firstDayOfWeek: Date, mock: boolean = }).then(res => decoder.decode(new Uint8Array(res.data))).then(content => content); const $ = load(html); - const nowDate = new Date().getDate(); + const today = new Date(); + today.setHours(0,0,0,0); const currentDate = new Date(firstDayOfWeek); const result: Food[][] = []; let dayIndex = 0; - while (currentDate.getDate() < nowDate) { + currentDate.setHours(0,0,0,0); + while (currentDate < today) { result[dayIndex] = [{ amount: undefined, name: "Pro tento den není uveřejněna nabídka jídel",