Fr3nch13/CakePHP Utilities

DifferenceFormatterInterface

Interface for formatting differences in text.

Table of Contents

Methods

diffForHumans()  : string
Get the difference in a human readable format.

Methods

diffForHumans()

Get the difference in a human readable format.

public diffForHumans(ChronosInterface $date[, ChronosInterface|null $other = null ][, bool $absolute = false ]) : string
Parameters
$date : ChronosInterface

The datetime to start with.

$other : ChronosInterface|null = null

The datetime to compare against.

$absolute : bool = false

Removes time difference modifiers ago, after, etc.

Tags
see
ChronosInterface::diffForHumans
Return values
string

The difference between the two days in a human readable format.


        
On this page

Search results