Skip to content

Commit

Permalink
Fix bug with estimate function
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Jul 10, 2021
1 parent 89105e2 commit 4c31d5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libraries/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ public function getCreatedEstimate() {
if ($d->h > 0 && $i < $t) { ++$i; $r .= sprintf('%s%d %s%s', ($r ? ', ' : ''), $d->h, 'hour', ($d->h !== 1 ? 's' : '')); }
if ($d->i > 0 && $i < $t) { ++$i; $r .= sprintf('%s%d %s%s', ($r ? ', ' : ''), $d->i, 'minute', ($d->i !== 1 ? 's' : '')); }

if ($i === 0) $r = 'created a moment ago';
if ($c > $now) $r = '-' . $r;

return $r;
}

Expand Down

0 comments on commit 4c31d5d

Please sign in to comment.