From 327a5ff77ad8f4100ae48a4429e78195710a9ad2 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 29 Feb 2024 02:55:21 -0800 Subject: fix(birthdays): leap year --- src/lib/Tools/Birthdays.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/Tools/Birthdays.svelte b/src/lib/Tools/Birthdays.svelte index 070abeda..462b660a 100644 --- a/src/lib/Tools/Birthdays.svelte +++ b/src/lib/Tools/Birthdays.svelte @@ -26,7 +26,7 @@ $: { month = Math.min(month, 12); month = Math.max(month, 1); - day = Math.min(day, new Date(0, month, 0).getDate()); + day = Math.min(day, new Date(new Date().getFullYear(), month, 0).getDate()); day = Math.max(day, 1); if (browser) anisearchBirthdays = aniSearchBirthdays(month, day); @@ -109,7 +109,7 @@ -- cgit v1.2.3