mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
14 lines
411 B
JavaScript
14 lines
411 B
JavaScript
function isTomorrow(date) {
|
|
if (!date) {
|
|
return false;
|
|
}
|
|
|
|
const dateObj = (typeof date === 'object') ? date : new Date(date);
|
|
const today = new Date();
|
|
const tomorrow = new Date((today.setDate(today.getDate() + 1)));
|
|
|
|
return dateObj.getDate() === tomorrow.getDate() && dateObj.getMonth() === tomorrow.getMonth() && dateObj.getFullYear() === tomorrow.getFullYear();
|
|
}
|
|
|
|
export default isTomorrow;
|