lib: Remove prefixedTimeSince()

refs #6778
This commit is contained in:
Eric Lippmann 2015-04-15 15:47:10 +02:00
parent 0f70701034
commit 44c8d37288
2 changed files with 0 additions and 17 deletions

View File

@ -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);

View File

@ -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(