$translate
$translate : \Cake\Chronos\Translator
The text translator object
Handles formatting differences in text.
Provides a swappable component for other libraries to leverage. when localizing or customizing the difference output.
$translate : \Cake\Chronos\Translator
The text translator object
__construct(\Cake\Chronos\Translator|null $translate = null)
Constructor.
\Cake\Chronos\Translator|null | $translate | The text translator object. |
diffForHumans(\Cake\Chronos\ChronosInterface $date, \Cake\Chronos\ChronosInterface|null $other = null, boolean $absolute = false) : string
Get the difference in a human readable format.
\Cake\Chronos\ChronosInterface | $date | The datetime to start with. |
\Cake\Chronos\ChronosInterface|null | $other | The datetime to compare against. |
boolean | $absolute | removes time difference modifiers ago, after, etc |
The difference between the two days in a human readable format
Loading…