Skip to content

Commit 4c31d5d

Browse files
committed
Fix bug with estimate function
1 parent 89105e2 commit 4c31d5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libraries/User.php

+3
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ public function getCreatedEstimate() {
413413
if ($d->h > 0 && $i < $t) { ++$i; $r .= sprintf('%s%d %s%s', ($r ? ', ' : ''), $d->h, 'hour', ($d->h !== 1 ? 's' : '')); }
414414
if ($d->i > 0 && $i < $t) { ++$i; $r .= sprintf('%s%d %s%s', ($r ? ', ' : ''), $d->i, 'minute', ($d->i !== 1 ? 's' : '')); }
415415

416+
if ($i === 0) $r = 'created a moment ago';
417+
if ($c > $now) $r = '-' . $r;
418+
416419
return $r;
417420
}
418421

0 commit comments

Comments
 (0)