Just to clarify at the offset, i am a javascript developer and this is a Math question , so my question is as follows:
suppose i create to dates in javascript like so:
var d1 = new Date(2005,12,4); // this will give me the time in millisecounds till '2005,12,4' var d2 = new Date(2013,05,2); // this will give me the time in millisecounds till '2013,05,2'
now check out the below formula:
(d2-d1)/1000/60/60/24/39);
note that d2 and d1 are both in millisecounds(might look something like 233798400000) ,
but what is the /1000/60/60/24/39 for ? What is this formula really giving me in the end ?
Division by $1000$ turns milliseconds to seconds, division by $60$ turns seconds into minutes, another division by $60$ turns minutes into hours, division by $24$ turns hours into days, finally division by $39$ turns days into multiples of 39 days (which is not a unit of time any more). So you will end up with the number of 39-day-periods between the dates.