parent
44c8d37288
commit
ff45faf123
|
@ -140,15 +140,6 @@ class Format
|
|||
return DateFormatter::create(DateFormatter::SINCE)->format($time);
|
||||
}
|
||||
|
||||
public static function prefixedTimeUntil($timestamp, $ucfirst)
|
||||
{
|
||||
$result = self::smartTimeDiff($timestamp - time(), $timestamp, true);
|
||||
if ($ucfirst) {
|
||||
$result = ucfirst($result);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected static function formatForUnits($value, & $units, $base)
|
||||
{
|
||||
$sign = '';
|
||||
|
|
|
@ -35,15 +35,6 @@ $this->addHelperFunction('timeUntil', function ($timestamp) {
|
|||
);
|
||||
});
|
||||
|
||||
$this->addHelperFunction('prefixedTimeUntil', function ($timestamp, $ucfirst = false) {
|
||||
if (! $timestamp) return '';
|
||||
return sprintf(
|
||||
'<span class="timeuntil" title="%s">%s</span>',
|
||||
date('Y-m-d H:i:s', $timestamp), // TODO: internationalized format
|
||||
Format::prefixedTimeUntil($timestamp, $ucfirst)
|
||||
);
|
||||
});
|
||||
|
||||
$this->addHelperFunction('dateTimeRenderer', function ($dateTimeOrTimestamp, $future = false) {
|
||||
return DateTimeRenderer::create($dateTimeOrTimestamp, $future);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue