bp_core_time_diff( array $args = array() )
Calculate the human time difference between two dates.
Description Description
Based on function created by Dunstan Orchard – http://1976design.com
Parameters Parameters
- $args
-
(Optional) An array of arguments. All arguments are technically optional.
- 'older_date'
(int|string) An integer Unix timestamp or a date string of the format 'Y-m-d h:i:s'. - 'newer_date'
(int|string) An integer Unix timestamp or a date string of the format 'Y-m-d h:i:s'. - 'time_chunks'
(int) The number of time chunks to get (1 or 2).
Default value: array()
- 'older_date'
Return Return
(null|array|false) Null if there's no time diff. An array containing 1 or 2 chunks of human time. False if travelling into the future.
Source Source
File: bp-core/bp-core-functions.php
Changelog Changelog
Version | Description |
---|---|
8.0.0 | Introduced. |