From b03053e7954cc9a690e73b0582fc5ce3f309dd53 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Wed, 9 Oct 2024 18:58:21 +0100 Subject: [PATCH] fix year --- src/pages/index.astro | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index d16eb86..bfbb482 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,10 +12,7 @@ const posts = (await getBlogs()).sort( ); const current = new Date(); const currentMonth = current.getMonth(); -const currentYear = - `${currentMonth === 0 ? current.getUTCFullYear() - 1 : current.getUTCFullYear() - 2}`.substring( - 2, - ); +const currentYear = `${current.getUTCFullYear() - 1}`.substring(2); ---