I want to find difference between two Dates. For that I did subtract one Date object from another Date object. My code is as follows :
var d1 = new Date(); /
Are you looking for this?
Math.ceil((new Date(2012, 11, 23) - new Date(2012, 11, 21)) / 86400000) + 1