Mega UI revamp

This commit is contained in:
akhisud3195 2025-03-27 18:52:17 +05:30 committed by Ramnique Singh
parent 650f481a96
commit bcb686a20d
94 changed files with 6984 additions and 3889 deletions

View file

@ -0,0 +1,19 @@
export function isToday(date: Date): boolean {
const today = new Date();
return date.getDate() === today.getDate() &&
date.getMonth() === today.getMonth() &&
date.getFullYear() === today.getFullYear();
}
export function isThisWeek(date: Date): boolean {
const now = new Date();
const weekStart = new Date(now.getFullYear(), now.getMonth(), now.getDate() - now.getDay());
const weekEnd = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (6 - now.getDay()));
return date >= weekStart && date <= weekEnd;
}
export function isThisMonth(date: Date): boolean {
const now = new Date();
return date.getMonth() === now.getMonth() &&
date.getFullYear() === now.getFullYear();
}