From ff45faf123b739e98af89d3d33fe2cf71be6bee1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 15 Apr 2015 15:47:39 +0200 Subject: [PATCH] lib: Remove prefixedTimeUntil() refs #6778 --- library/Icinga/Util/Format.php | 9 --------- library/Icinga/Web/View/helpers/format.php | 9 --------- 2 files changed, 18 deletions(-) diff --git a/library/Icinga/Util/Format.php b/library/Icinga/Util/Format.php index 14705d7ee..f6e64def3 100644 --- a/library/Icinga/Util/Format.php +++ b/library/Icinga/Util/Format.php @@ -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 = ''; diff --git a/library/Icinga/Web/View/helpers/format.php b/library/Icinga/Web/View/helpers/format.php index e584fa47a..c5f7ca9e6 100644 --- a/library/Icinga/Web/View/helpers/format.php +++ b/library/Icinga/Web/View/helpers/format.php @@ -35,15 +35,6 @@ $this->addHelperFunction('timeUntil', function ($timestamp) { ); }); -$this->addHelperFunction('prefixedTimeUntil', function ($timestamp, $ucfirst = false) { - if (! $timestamp) return ''; - return sprintf( - '%s', - 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); });