WordPress at Your Fingertips
function is not described

SimplePie_Item::get_local_date() public WP 1.0

Get the localized posting date/time for the item

Returns the date formatted in the localized language. To display in languages other than the server's default, you need to change the locale with setlocale(). The available localizations depend on which ones are installed on your web server.

{} It's a method of the class: SimplePie_Item{}

No Hooks.




$SimplePie_Item = new SimplePie_Item();
$SimplePie_Item->get_local_date( $date_format );
Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data)
Default: '%c'


Since 1.0 Introduced.

Code of SimplePie_Item::get_local_date() WP 5.8.2

public function get_local_date($date_format = '%c')
	if (!$date_format)
		return $this->sanitize($this->get_date(''), SIMPLEPIE_CONSTRUCT_TEXT);
	elseif (($date = $this->get_date('U')) !== null && $date !== false)
		return strftime($date_format, $date);

	return null;