From 2fcda9c7056dd0f57c03d8731a70ded4f1deda3f Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Mon, 9 Sep 2024 20:35:12 +0000 Subject: [PATCH] web/ChangelogEntry: fix off-by-one changelog date in some cases --- web/src/components/changelog/ChangelogEntry.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/src/components/changelog/ChangelogEntry.svelte b/web/src/components/changelog/ChangelogEntry.svelte index 34419751..acb7256c 100644 --- a/web/src/components/changelog/ChangelogEntry.svelte +++ b/web/src/components/changelog/ChangelogEntry.svelte @@ -15,15 +15,14 @@ const formatDate = (dateString: string) => { const date = new Date(dateString); - const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; return [ - months[date.getUTCMonth()], - date.getUTCDate() + 1 + ",", - date.getUTCFullYear(), + months[date.getMonth()], + date.getDate() + ",", + date.getFullYear(), ].join(" "); };