FormattedDateDiff
class FormattedDateDiff implements RenderableInterface, CacheableDependencyInterface (View source)
Contains a formatted time difference.
Traits
Trait to implement CacheableDependencyInterface for unchanging objects.
Properties
| protected string | $string | The actual formatted time difference. |
|
| protected int | $maxAge | The maximum time in seconds that this string may be cached. |
Methods
int
getCacheMaxAge()
The maximum age for which this object may be cached.
__construct(string $string, int $max_age)
Creates a new FormattedDateDiff instance.
string
getString()
No description
array
toRenderable()
Returns a render array representation of the object.
Details
getCacheContexts()
{@inheritdoc}
getCacheTags()
{@inheritdoc}
int
getCacheMaxAge()
The maximum age for which this object may be cached.
__construct(string $string, int $max_age)
Creates a new FormattedDateDiff instance.
string
getString()
No description
array
toRenderable()
Returns a render array representation of the object.