Javascript help fixing a working time ago date function to simply show seconds ago.
- by Scarface
Hey guys quick question, I am using a javascript function and it works except I can only make it say 0 seconds ago, when the time is under a minute. Can anyone quickly explain what I am doing wrong?
function handleDate( timestamp ) {
var n=new Date(), t, ago = " ";
if( timestamp ) {
t = Math.round( (n.getTime()/1000 -…