SimplePie_Item::get_local_date

Advertisement

Summery Summery

Get the localized posting date/time for the item

Syntax Syntax

SimplePie_Item::get_local_date( string $date_format = '%c' )

Description Description

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.

Parameters Parameters

$date_format

(Optional) Supports any PHP date format from http://php.net/strftime (empty for the raw data)

Default value: '%c'

Return Return

(int|string|null)

Source Source

File: wp-includes/SimplePie/Item.php

	 * languages other than the server's default, you need to change the locale
	 * with {@link http://php.net/setlocale setlocale()}. The available
	 * localizations depend on which ones are installed on your web server.
	 *
	 * @since 1.0
	 *
	 * @param string $date_format Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data)
	 * @return int|string|null
	 */
	public function get_local_date($date_format = '%c')
	{
		if (!$date_format)
		{
			return $this->sanitize($this->get_date(''), SIMPLEPIE_CONSTRUCT_TEXT);
		}

Advertisement

Changelog Changelog

Changelog
Version Description
1.0 Introduced.

Advertisement

Leave a Reply