fix 'x.0 years' bug and add sort by last active to memberlist

[closes #45]

also adds tooltips (title tags) to the "registered on" and
"last active" fields in the memberlist, which contain
a relative-format time (e.g. '1 day 5 hrs. ago')
This commit is contained in:
Xkeeper
2018-12-11 15:19:20 -08:00
parent 2e047c1c1c
commit 82905dc369
2 changed files with 14 additions and 10 deletions

View File

@@ -329,7 +329,7 @@ function timeunits($sec){
if($sec<86400) return floor($sec/3600).' hours';
if($sec<172800) return '1 day';
if($sec<31556926) return floor($sec/86400).' days';
return sprintf("%.1f years", floor($sec/31556926));
return sprintf("%.1f years", $sec/31556926);
}
function timeunits2($sec){