Property | Type | Description | |
---|---|---|---|
$diffFormatter | Instance of the diff formatting object. |
Method | Description | |
---|---|---|
diffFiltered ( |
Get the difference by the given interval using a filter callable | |
diffForHumans ( Cake\Chronos\ChronosInterface $other = null, boolean $absolute = false ) : string | Get the difference in a human readable format. | |
diffFormatter ( |
Get the difference formatter instance or overwrite the current one. | |
diffInDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in days | |
diffInDaysFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in days using a filter callable | |
diffInHours ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in hours | |
diffInHoursFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in hours using a filter callable | |
diffInMinutes ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in minutes | |
diffInMonths ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in months | |
diffInSeconds ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in seconds | |
diffInWeekdays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in weekdays | |
diffInWeekendDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in weekend days using a filter | |
diffInWeeks ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in weeks | |
diffInYears ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | Get the difference in years | |
fromNow ( DateTime | DateTimeImmutable $datetime ) : DateInterval | boolean | Convenience method for getting the remaining time from a given time. | |
secondsSinceMidnight ( ) : integer | The number of seconds since midnight. | |
secondsUntilEndOfDay ( ) : integer | The number of seconds until 23:23:59. |
public diffFiltered ( |
||
$ci | An interval to traverse by | |
$callback | callable | The callback to use for filtering. |
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffForHumans ( Cake\Chronos\ChronosInterface $other = null, boolean $absolute = false ) : string | ||
$other | Cake\Chronos\ChronosInterface | The datetime to compare with. |
$absolute | boolean | removes time difference modifiers ago, after, etc |
return | string |
public static diffFormatter ( |
||
$formatter | The formatter instance when setting. | |
return | The formatter instance. |
public diffInDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInDaysFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$callback | callable | The callback to use for filtering. |
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInHours ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInHoursFiltered ( callable $callback, Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$callback | callable | The callback to use for filtering. |
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInMinutes ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInMonths ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInSeconds ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInWeekdays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInWeekendDays ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInWeeks ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public diffInYears ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer | ||
$dt | Cake\Chronos\ChronosInterface | The instance to difference from. |
$abs | boolean | Get the absolute of the difference |
return | integer |
public secondsSinceMidnight ( ) : integer | ||
return | integer |
public secondsUntilEndOfDay ( ) : integer | ||
return | integer |