lib: Remove prefixedTimeUntil()

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

View File

@ -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 = '';

View File

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