'); }); }); } function relative_time (time_value) { var b = new Date(); var c = new Date(time_value); var d = b - c; var e = 1000; var minute = e * 60; var hour = minute * 60; var day = hour * 24; var week = day * 7; if (isNaN(d) || d right now'; } if (d ' + Math.floor(d / e) + " seconds ago"; } if (d about 1 minute ago'; } if (d ' + Math.floor(d / minute) + ' minutes ago'; } if (d about 1 hour ago'; } if (d ' + Math.floor(d / hour) + ' hours ago'; } if (d > day && d ' + Math.floor(d / day) + ' days ago'; } else { return ''; } }
|
|