Is there a Javascript equivalent for this PHP code?
function secondsAgo($unixtime){
return time() - $unixtime;
}
Example usage:
echo secondsAgo(time()-10); // 10
I have a unixtimestamp in Javascript and need to find out how many seconds have passed from today until that timestamp.
JS equivelant: