Podpora víkendů

This commit is contained in:
2023-06-02 21:12:38 +02:00
parent d59e439588
commit ec1cbf332b
5 changed files with 58 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
import { ClientData, Locations } from "./types";
import { db } from "./database";
import { getTodayString } from "./utils";
import { getHumanDate, getIsWeekend } from "./utils";
import { getDate } from "./utils";
// /** Jedna konkrétní pizza */
@@ -33,7 +33,7 @@ import { getDate } from "./utils";
/** Vrátí "prázdná" (implicitní) data, pokud ještě nikdo nehlasoval. */
function getEmptyData(): ClientData {
return { date: getTodayString(), choices: {} };
return { date: getHumanDate(new Date()), isWeekend: getIsWeekend(new Date()), choices: {} };
}
/**