diff --git a/src/pages/index.astro b/src/pages/index.astro index 9ca9a79..85d05d7 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,7 +12,10 @@ const posts = (await getBlogs()).sort( ); const current = new Date(); const currentMonth = current.getMonth(); -const currentYear = `${current.getUTCFullYear() - 1}`.substring(2); +const currentYear = + `${currentMonth === 0 ? current.getUTCFullYear() - 1 : current.getUTCFullYear() - 2}`.substring( + 2, + ); --- @@ -71,7 +74,7 @@ const currentYear = `${current.getUTCFullYear() - 1}`.substring(2); class="py-8 px-4 max-w-4xl flex flex-col items-center space-y-0 leading-tight" >
- KENNETHNYM v{currentYear}.{currentMonth + 3} + KENNETHNYM v{currentYear}.{currentMonth === 9 ? 0 : currentMonth + 3}

 

software engineer. unpaid hhkb salesman.