function DateFormatter::formatTimeDiffUntil
Same name in other branches
- 9 core/lib/Drupal/Core/Datetime/DateFormatter.php \Drupal\Core\Datetime\DateFormatter::formatTimeDiffUntil()
- 8.9.x core/lib/Drupal/Core/Datetime/DateFormatter.php \Drupal\Core\Datetime\DateFormatter::formatTimeDiffUntil()
- 10 core/lib/Drupal/Core/Datetime/DateFormatter.php \Drupal\Core\Datetime\DateFormatter::formatTimeDiffUntil()
Overrides DateFormatterInterface::formatTimeDiffUntil
File
-
core/
lib/ Drupal/ Core/ Datetime/ DateFormatter.php, line 186
Class
- DateFormatter
- Provides a service to handle various date related functionality.
Namespace
Drupal\Core\DatetimeCode
public function formatTimeDiffUntil($timestamp, $options = []) {
$request_time = $this->requestStack
->getCurrentRequest()->server
->get('REQUEST_TIME');
return $this->formatDiff($request_time, $timestamp, $options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.