fix version calculation
This commit is contained in:
@@ -12,7 +12,10 @@ const posts = (await getBlogs()).sort(
|
|||||||
);
|
);
|
||||||
const current = new Date();
|
const current = new Date();
|
||||||
const currentMonth = current.getMonth();
|
const currentMonth = current.getMonth();
|
||||||
const currentYear = `${current.getUTCFullYear() - 1}`.substring(2);
|
const currentYear =
|
||||||
|
`${currentMonth === 0 ? current.getUTCFullYear() - 1 : current.getUTCFullYear() - 2}`.substring(
|
||||||
|
2,
|
||||||
|
);
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
@@ -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"
|
class="py-8 px-4 max-w-4xl flex flex-col items-center space-y-0 leading-tight"
|
||||||
>
|
>
|
||||||
<header class="font-bold text-center">
|
<header class="font-bold text-center">
|
||||||
KENNETHNYM v{currentYear}.{currentMonth + 3}
|
KENNETHNYM v{currentYear}.{currentMonth === 9 ? 0 : currentMonth + 3}
|
||||||
</header>
|
</header>
|
||||||
<p class="leading-none"> </p>
|
<p class="leading-none"> </p>
|
||||||
<p class="text-center">software engineer. unpaid hhkb salesman.</p>
|
<p class="text-center">software engineer. unpaid hhkb salesman.</p>
|
||||||
|
Reference in New Issue
Block a user