bbp_convert_date( string $time, string $d = 'U', bool $translate = false )

Convert time supplied from database query into specified date format.


Description Description


Parameters Parameters

$time

(Required) Time to convert

$d

(Optional) Default is 'U'. Either 'G', 'U', or php date format

Default value: 'U'

$translate

(Optional) Default is false. Whether to translate the

Default value: false


Top ↑

Return Return

(string) Returns timestamp


Top ↑

Source Source

File: includes/common/formatting.php

function bbp_convert_date( $time, $d = 'U', $translate = false ) {
	$new_time = mysql2date( $d, $time, $translate );

	// Filter & return
	return apply_filters( 'bbp_convert_date', $new_time, $d, $translate, $time );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.