/**
* Get the time difference between 2 dates in days
*/
function timeDayDifference(endDate,startDate) {
var difference = endDate.getTime() - startDate.getTime();
difference -= (Math.floor(difference/1000/60/60/24)*1000*60*60*24);
return difference;
}
/**
* Get the time difference between 2 dates in hours
*/
function timeHourDifference(endDate,startDate) {
var difference = endDate.getTime() - startDate.getTime();
difference -= (Math.floor(difference/1000/60/60)*1000*60*60);
return difference;
}
/**
* Get the time difference between 2 dates in minutes
*/
function timeMinuteDifference(endDate,startDate) {
var difference = endDate.getTime() - startDate.getTime();
difference -= (Math.floor(difference/1000/60)*1000*60);
return difference;
}
/**
* Get the time difference between 2 dates in seconds
*/
function timeSecondDifference(endDate,startDate) {
var difference = endDate.getTime() - startDate.getTime();
difference = Math.floor(difference/1000);
return difference;
}