Oprava načítání jídel pro Šenk Šeříková na přelomu měsíce
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful

This commit is contained in:
Martin Berka 2025-08-01 14:00:27 +02:00
parent d2845f7d0f
commit 480fe725f1
No known key found for this signature in database

View File

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