diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/Tools/Birthdays.svelte | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ </select> <select bind:value={day}> - {#each Array.from({ length: new Date(0, month, 0).getDate() }, (_, i) => i + 1) as day} + {#each Array.from({ length: new Date(new Date().getFullYear(), month, 0).getDate() }, (_, i) => i + 1) as day} <option value={day}>{day}</option> {/each} </select> |