bbp_time_since

Output formatted time to display human readable time difference.

Description

bbp_time_since( (string) $older_date, (constant) $newer_date = false, (bool) $gmt = false ); 

Parameters (3)

0. $older_date (string)
Unix timestamp from which the difference begins.
1. $newer_date — Optional. (constant) => false
Unix timestamp from which the difference ends. False for current time.
2. $gmt — Optional. (bool) => false
Whether to use GMT timezone. Default is false.

Usage

  1. if ( !function_exists( 'bbp_time_since' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/functions.php'; 
  3.  
  4. // Unix timestamp from which the difference begins. 
  5. $older_date = ''; 
  6.  
  7. // Optional. Unix timestamp from which the 
  8. // difference ends. False for current time. 
  9. $newer_date = false; 
  10.  
  11. // Optional. Whether to use GMT timezone. Default is false. 
  12. $gmt = false; 
  13.  
  14. // NOTICE! Understand what this does before running. 
  15. $result = bbp_time_since($older_date, $newer_date, $gmt); 
  16.  

Defined (1)

The function is defined in the following location(s).

/includes/common/functions.php  
  1. function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) { 
  2. echo bbp_get_time_since( $older_date, $newer_date, $gmt );