Hello Haruhiko,
The method if the following:
function daysBetween(first, second) {
return ( Math.round((second.getTime()-first.getTime())/(1000*60*60*24)) );
}
it's called in this way:
if(daysBetween(lastCheck,new Date()) < 1)
or
if(daysBetween(agentList[agent]['lastSeen'],new Date()) < 1)
Please let me know if you can see what is the problem.
Thanks,
Henry.-