Suppose you have two Date objects, you can simply subtract them to get the difference in milliseconds:
Date
var difference = date2 - date1;
From there, you can use simple arithmetic operations to derive other values.
Suppose you have two
Date
objects, you can simply subtract them to get the difference in milliseconds:From there, you can use simple arithmetic operations to derive other values.