fix(theme): christmas theme should only run on dec 24 and 25

that's how 4chan does it, it makes sense since the theme is distracting especially on desktop
This commit is contained in:
Tom (plebeius.eth)
2025-01-26 23:35:50 +01:00
parent 65ed3dffd5
commit cbed83cd10
5 changed files with 16 additions and 19 deletions
+1 -1
View File
@@ -102,5 +102,5 @@ export const shouldShowSnow = (): boolean => {
const today = new Date();
const month = today.getMonth();
const day = today.getDate();
return (month === 11 && day >= 24) || (month === 0 && day <= 5);
return month === 11 && (day === 24 || day === 25);
};
+7
View File
@@ -68,3 +68,10 @@ export const getFormattedTimeAgo = (unixTimestamp: number): string => {
}
return t('time_x_years_ago', { count: Math.floor(timeDifference / 31104000) });
};
export const isChristmas = (): boolean => {
const today = new Date();
const month = today.getMonth();
const day = today.getDate();
return month === 11 && (day === 24 || day === 25);
};