From ae062744c2bf2cca5b4bef6b2832ceedd0fd1535 Mon Sep 17 00:00:00 2001
From: Serge Bibauw <sbibauw@gmail.com>
Date: Wed, 5 Jun 2024 00:17:36 +0200
Subject: [PATCH] fix(date): remove padding on hours & days

---
 frontend/src/lib/utils/date.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/frontend/src/lib/utils/date.ts b/frontend/src/lib/utils/date.ts
index 7e92b864..dfdf5373 100644
--- a/frontend/src/lib/utils/date.ts
+++ b/frontend/src/lib/utils/date.ts
@@ -37,7 +37,7 @@ export function displayDate(date: Date): string {
 
 	const now = new Date();
 
-	const hours = date.getHours().toString().padStart(2, '0');
+	const hours = date.getHours().toString();
 	const minutes = date.getMinutes().toString().padStart(2, '0');
 
 	if (now.getDate() === date.getDate()) {
@@ -64,7 +64,7 @@ export function displayTime(date: Date): string {
 
 	const now = new Date();
 
-	const hours = date.getHours().toString().padStart(2, '0');
+	const hours = date.getHours().toString();
 	const minutes = date.getMinutes().toString().padStart(2, '0');
 
 	if (
@@ -75,7 +75,7 @@ export function displayTime(date: Date): string {
 		return hours + ':' + minutes;
 	}
 
-	const day = date.getDate().toString().padStart(2, '0');
+	const day = date.getDate().toString();
 	const month = getFullMonth(date.getMonth());
 
 	if (now.getFullYear() === date.getFullYear()) {
-- 
GitLab