Interface DifferenceFormatterInterface
Interface for formatting differences in text.
Namespace: Cake\Chronos
Method Summary
-
diffForHumans() public
Get the difference in a human readable format.
Method Detail
diffForHumans() ΒΆ public
diffForHumans(Cake\Chronos\ChronosInterface $date, Cake\Chronos\ChronosInterface|null $other = null, bool $absolute = false): string
Get the difference in a human readable format.
Parameters
-
Cake\Chronos\ChronosInterface
$date The datetime to start with.
-
Cake\Chronos\ChronosInterface|null
$other optional The datetime to compare against.
-
bool
$absolute optional Removes time difference modifiers ago, after, etc.
Returns
string
See Also
\Cake\Chronos\ChronosInterface::diffForHumans