You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prowlarr/frontend/src/Utilities/Date/isTomorrow.js

14 lines
411 B

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;