mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: uh hahaha you'll see
This commit is contained in:
1 parent
d5d171bea6
commit
9538a03afb
4 files changed
+102
-124
No files matched your search
@@ -1,4 +1,15 @@
|
||||
const now = new Date();
|
||||
export const isFunny =
|
||||
(now.getMonth() === 3 && now.getDate() === 1) ||
|
||||
import.meta.env.DEBUG_FUNNY === 'true';
|
||||
const FUNNY_DATES: [number, number][] = [
|
||||
// two days for april fools
|
||||
[4, 1],
|
||||
[4, 2],
|
||||
];
|
||||
|
||||
export function isFunny() {
|
||||
const now = new Date();
|
||||
|
||||
return (
|
||||
FUNNY_DATES.some(
|
||||
([month, day]) => now.getMonth() === month - 1 && now.getDate() === day,
|
||||
) || import.meta.env.DEBUG_FUNNY === 'true'
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user