
function calculateDaysDifference(targetDateString) {const currentDate = new Date();const targetDate = new Date(targetDateString);const timeDifference = targetDate - currentDate;const daysDifference = Math.max(Math.floor(timeDifference / (1000 * 60 * 60 * 24)), 0);const hoursDifference = Math.max(Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)), 0);const minutesDifference = Math.max(Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)), 0);return {days: daysDifference,hours: hoursDifference,minutes: minutesDifference};
}