public function FormattedDateDiff::__construct
public FormattedDateDiff::__construct($string, $max_age)
Creates a new FormattedDateDiff instance.
Parameters
string $string: The formatted time difference.
int $max_age: The maximum time in seconds that this string may be cached.
File
- core/lib/Drupal/Core/Datetime/FormattedDateDiff.php, line 41
Class
- FormattedDateDiff
- Contains a formatted time difference.
Namespace
Drupal\Core\DatetimeCode
public function __construct($string, $max_age) { $this->string = $string; $this->maxAge = $max_age; }
© 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!FormattedDateDiff.php/function/FormattedDateDiff::__construct/8.1.x