From cd973b252a1304b207893b8f2327fc861d7492db Mon Sep 17 00:00:00 2001 From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Thu, 8 Jan 2026 12:16:33 +0900 Subject: fix(frontend): 2月29日を誕生日に設定している場合、平年は3月1日を誕生日として扱うように (#17072) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): 2月29日を誕生日に設定している場合、平年は3月1日を誕生日として扱うように * Update Changelog * add tests * spdx --- packages/frontend/src/boot/main-boot.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'packages/frontend/src/boot') diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 10b1199bbb..3d4ecbf75b 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -29,6 +29,7 @@ import { prefer } from '@/preferences.js'; import { updateCurrentAccountPartial } from '@/accounts.js'; import { migrateOldSettings } from '@/pref-migrate.js'; import { unisonReload } from '@/utility/unison-reload.js'; +import { isBirthday } from '@/utility/is-birthday.js'; export async function mainBoot() { const { isClientUpdated, lastVersion } = await common(async () => { @@ -144,12 +145,8 @@ export async function mainBoot() { const m = now.getMonth() + 1; const d = now.getDate(); - if ($i.birthday) { - const bm = parseInt($i.birthday.split('-')[1]); - const bd = parseInt($i.birthday.split('-')[2]); - if (m === bm && d === bd) { - claimAchievement('loggedInOnBirthday'); - } + if (isBirthday($i, now)) { + claimAchievement('loggedInOnBirthday'); } if (m === 1 && d === 1) { -- cgit v1.2.3-freya