Files
homarr/src/tools/isToday.ts
2023-01-23 01:34:36 +09:00

9 lines
221 B
TypeScript

export const isToday = (date: Date) => {
const today = new Date();
return (
today.getDate() === date.getDate() &&
today.getMonth() === date.getMonth() &&
today.getFullYear() === date.getFullYear()
);
};