From 8e684ebc004e9a630232dcb24dd07d761303a0c8 Mon Sep 17 00:00:00 2001 From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it> Date: Mon, 21 Jun 2021 15:42:39 +0200 Subject: [PATCH] Add 1 to UTC date. --- src/api/util/formatDate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/util/formatDate.ts b/src/api/util/formatDate.ts index 8ead4cc..7081066 100644 --- a/src/api/util/formatDate.ts +++ b/src/api/util/formatDate.ts @@ -5,5 +5,7 @@ */ export const formatDate = (date: Date): string => date !== null && date !== undefined - ? `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${date.getUTCDate()}` + ? `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${ + date.getUTCDate() + 1 + }` : ''; -- GitLab