Podpora mock dat pro vývoj o víkendech

This commit is contained in:
2023-06-03 09:24:36 +02:00
parent b438d2112a
commit c814624dbc
10 changed files with 58 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
export function getDate() {
const date = new Date();
/** Vrátí datum v ISO formátu. */
export function formatDate(date: Date) {
let currentDay = String(date.getDate()).padStart(2, '0');
let currentMonth = String(date.getMonth() + 1).padStart(2, "0");
let currentYear = date.getFullYear();