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\ChronosDateDateTimeInterface $first, Cake\Chronos\ChronosDateDateTimeInterface|null $second = null, bool $absolute = false): string
Get the difference in a human readable format.
Parameters
-
Cake\Chronos\ChronosDateDateTimeInterface
$first The datetime to start with.
-
Cake\Chronos\ChronosDateDateTimeInterface|null
$second optional The datetime to compare against.
-
bool
$absolute optional removes time difference modifiers ago, after, etc
Returns
string