public DateFormatterInterface::formatDiff($from, $to, $options = array())
Formats a time interval between two timestamps.
int $from: A UNIX timestamp, defining the from date and time.
int $to: A UNIX timestamp, defining the to date and time.
array $options: (optional) An associative array with additional options. The following keys can be used:
string|\Drupal\Core\Datetime\FormattedDateDiff A translated string representation of the interval. This interval is always positive.
\Drupal\Core\Datetime\DateFormatterInterface::formatInterval()
\Drupal\Core\Datetime\DateFormatterInterface::formatTimeDiffSince()
\Drupal\Core\Datetime\DateFormatterInterface::formatTimeDiffUntil()
public function formatDiff($from, $to, $options = array());
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Datetime!DateFormatterInterface.php/function/DateFormatterInterface::formatDiff/8.1.x