1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-19 18:15:47 +02:00

fix(frontend): 2月29日を誕生日に設定している場合、平年は3月1日を誕生日として扱うように (#17072)

* fix(frontend): 2月29日を誕生日に設定している場合、平年は3月1日を誕生日として扱うように

* Update Changelog

* add tests

* spdx
This commit is contained in:
かっこかり
2026-01-08 12:16:33 +09:00
committed by GitHub
parent 666f78e676
commit cd973b252a
5 changed files with 92 additions and 16 deletions

View File

@@ -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) {