summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2026-01-08 12:16:33 +0900
committerGitHub <noreply@github.com>2026-01-08 12:16:33 +0900
commitcd973b252a1304b207893b8f2327fc861d7492db (patch)
tree5dcd7cd1761b688e5f0ea01a9d61e9276c95db1e /packages/frontend/src/pages
parentenable and fix no-unused-vars and no-async-promise-executor (#17070) (diff)
downloadmisskey-cd973b252a1304b207893b8f2327fc861d7492db.tar.gz
misskey-cd973b252a1304b207893b8f2327fc861d7492db.tar.bz2
misskey-cd973b252a1304b207893b8f2327fc861d7492db.zip
fix(frontend): 2月29日を誕生日に設定している場合、平年は3月1日を誕生日として扱うように (#17072)
* fix(frontend): 2月29日を誕生日に設定している場合、平年は3月1日を誕生日として扱うように * Update Changelog * add tests * spdx
Diffstat (limited to 'packages/frontend/src/pages')
-rw-r--r--packages/frontend/src/pages/user/home.vue15
1 files changed, 5 insertions, 10 deletions
diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue
index b61c84cbbc..ee04ca9e4a 100644
--- a/packages/frontend/src/pages/user/home.vue
+++ b/packages/frontend/src/pages/user/home.vue
@@ -186,6 +186,7 @@ import { getStaticImageUrl } from '@/utility/media-proxy.js';
import MkSparkle from '@/components/MkSparkle.vue';
import { prefer } from '@/preferences.js';
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
+import { isBirthday } from '@/utility/is-birthday.js';
function calcAge(birthdate: string): number {
const date = new Date(birthdate);
@@ -319,16 +320,10 @@ function disposeBannerParallaxResizeObserver() {
onMounted(() => {
narrow.value = rootEl.value!.clientWidth < 1000;
- if (props.user.birthday) {
- const m = new Date().getMonth() + 1;
- const d = new Date().getDate();
- const bm = parseInt(props.user.birthday.split('-')[1]);
- const bd = parseInt(props.user.birthday.split('-')[2]);
- if (m === bm && d === bd) {
- confetti({
- duration: 1000 * 4,
- });
- }
+ if (isBirthday(user.value)) {
+ confetti({
+ duration: 1000 * 4,
+ });
}
nextTick(() => {