parent
0f70701034
commit
44c8d37288
|
@ -140,15 +140,6 @@ class Format
|
|||
return DateFormatter::create(DateFormatter::SINCE)->format($time);
|
||||
}
|
||||
|
||||
public static function prefixedTimeSince($timestamp, $ucfirst = false)
|
||||
{
|
||||
$result = self::smartTimeDiff(time() - $timestamp, $timestamp, true);
|
||||
if ($ucfirst) {
|
||||
$result = ucfirst($result);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function prefixedTimeUntil($timestamp, $ucfirst)
|
||||
{
|
||||
$result = self::smartTimeDiff($timestamp - time(), $timestamp, true);
|
||||
|
|
|
@ -35,14 +35,6 @@ $this->addHelperFunction('timeUntil', function ($timestamp) {
|
|||
);
|
||||
});
|
||||
|
||||
$this->addHelperFunction('prefixedTimeSince', function ($timestamp, $ucfirst = false) {
|
||||
return sprintf(
|
||||
'<span class="timesince" title="%s">%s</span>',
|
||||
date('Y-m-d H:i:s', $timestamp), // TODO: internationalized format
|
||||
Format::prefixedTimeSince($timestamp, $ucfirst)
|
||||
);
|
||||
});
|
||||
|
||||
$this->addHelperFunction('prefixedTimeUntil', function ($timestamp, $ucfirst = false) {
|
||||
if (! $timestamp) return '';
|
||||
return sprintf(
|
||||
|
|
Loading…
Reference in New Issue