mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
13 lines
329 B
JavaScript
13 lines
329 B
JavaScript
function isToday(date) {
|
|
if (!date) {
|
|
return false;
|
|
}
|
|
|
|
const dateObj = (typeof date === 'object') ? date : new Date(date);
|
|
const today = new Date();
|
|
|
|
return dateObj.getDate() === today.getDate() && dateObj.getMonth() === today.getMonth() && dateObj.getFullYear() === today.getFullYear();
|
|
}
|
|
|
|
export default isToday;
|