'$h_users' => L10n::t('Users'),
'$h_newuser' => L10n::t('New User'),
- '$th_deleted' => [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Deleted since')],
+ '$th_deleted' => [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Delete in')],
'$th_users' => $th_users,
'$order_users' => $order,
'$order_direction_users' => $order_direction,
return L10n::t('never');
}
+ $isfuture = false;
$etime = time() - $abs;
- if ($etime < 1) {
+ if ($etime < 1 && $etime >= 0) {
return L10n::t('less than a second ago');
}
+ if ($etime < 0){
+ $etime = -$etime;
+ $isfuture = true;
+ }
+
$a = [12 * 30 * 24 * 60 * 60 => [L10n::t('year'), L10n::t('years')],
30 * 24 * 60 * 60 => [L10n::t('month'), L10n::t('months')],
7 * 24 * 60 * 60 => [L10n::t('week'), L10n::t('weeks')],
$r = round($d);
// translators - e.g. 22 hours ago, 1 minute ago
if (!$format) {
- $format = L10n::t('%1$d %2$s ago');
+ if($isfuture){
+ $format = L10n::t('in %1$d %2$s');
+ }
+ else {
+ $format = L10n::t('%1$d %2$s ago');
+ }
}
return sprintf($format, $r, (($r == 1) ? $str[0] : $str[1]));