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
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
This commit is contained in:
parent
d2845f7d0f
commit
480fe725f1
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user