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