Calculating the Days Between Any Two Dates
Our web spider found the following code snippet at www_mcfedries_com and contains information about abs and JavaScript.
abs(date1_ms - date2_ms) 
// Convert back to days and return 
return Math.round(difference_ms/ONE_DAY) 
//--> 
</script> 

This function accepts two Date object arguments—date1 and date2. Note that 
is doesn't matter which date is earlier or later because this function calculate
s the absolute value of the difference between them. The constant ONE_DAY stores
 the number of milliseconds in a day, and then the two dates are converted into 
milliseconds using the getTime() method. The results are stored in the variables
 date1_ms and date2_ms. 

Next the following statement calculates the absolute value, in milliseconds, of 
the difference between the two dates: 
var difference_ms = Math.abs(date1_ms - date2_
Read the entire article....