The below code is working fine in Chrome, but in IE browser I am seeing the below console error:
object does not support property or method 'trunc'
Code:
var Days = (new Date(date1) - new Date(date2)) / 50;
if (Math.trunc(Days) > 45)) {
alert("it should be less than 45 days");
}