Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6948f38d
Commit
6948f38d
authored
Aug 04, 2014
by
alexpott
Browse files
Issue
#2308783
by er.pushpinderrana | mikey_p: Remove format_interval().
parent
769ab39e
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/includes/common.inc
View file @
6948f38d
...
...
@@ -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.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment