In javascript how can I compare two timestamps to see how many days difference they are?
Current code I have:
var todaysDate = Math.floor(Date.now() / 1000);
for (var i = 0; i < 1; i++) {
var job = this.listOfJobs[i];
var jobDate = Date.parse(job.timestamp) / 1000;
//now how would I compare these two timestamps to see how many days apart they are e.g. todaysDate and jobDate
}
The 2 timestamps I have for example are:
todays date: 1475336651 And the job created date: 1465337544
I've substracted those and it equals: 9999107
How many days is 9999107?