bb_datetime_format_i18n

The BuddyPress bb datetime format i18n function.

Description

bb_datetime_format_i18n( $unixtimestamp, (string) $type = 'datetime', (string) $formatstring = '', (bool) $gmt = true ); 

Parameters (4)

0. $unixtimestamp
The unixtimestamp.
1. $type — Optional. (string) => 'datetime'
The type.
2. $formatstring — Optional. (string) => ''
The formatstring.
3. $gmt — Optional. (bool) => true
The gmt.

Usage

  1. if ( !function_exists( 'bb_datetime_format_i18n' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/class.bb-locale.php'; 
  3.  
  4. // The unixtimestamp. 
  5. $unixtimestamp = null; 
  6.  
  7. // The type. 
  8. $type = 'datetime'; 
  9.  
  10. // The formatstring. 
  11. $formatstring = ''; 
  12.  
  13. // The gmt. 
  14. $gmt = true; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = bb_datetime_format_i18n($unixtimestamp, $type, $formatstring, $gmt); 
  18.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/class.bb-locale.php  
  1. function bb_datetime_format_i18n( $unixtimestamp, $type = 'datetime', $formatstring = '', $gmt = true ) { 
  2. if ( empty($formatstring) ) { 
  3. $formatstring = bb_get_datetime_formatstring_i18n( $type ); 
  4. return bb_gmdate_i18n( $formatstring, bb_offset_time( $unixtimestamp ), $gmt );