Commit 6948f38d authored by alexpott's avatar alexpott

Issue #2308783 by er.pushpinderrana | mikey_p: Remove format_interval().

parent 769ab39e
......@@ -581,29 +581,6 @@ function format_size($size, $langcode = NULL) {
}
}
/**
* Formats a time interval with the requested granularity.
*
* @param $interval
* The length of the interval in seconds.
* @param $granularity
* How many different units to display in the string.
* @param $langcode
* Optional language code to translate to a language other than
* what is used to display the page.
*
* @return
* A translated string representation of the interval.
*
* @see \Drupal\Core\Datetime\Date::formatInterval()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::service('date')->formatInterval().
*/
function format_interval($interval, $granularity = 2, $langcode = NULL) {
return \Drupal::service('date')->formatInterval($interval, $granularity, $langcode);
}
/**
* Formats a date, using a date type or a custom date format string.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment