SimplePie_Item::get_local_date()publicWP 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.

{} Это метод класса: SimplePie_Item{}

Хуков нет.




$SimplePie_Item = new SimplePie_Item();
$SimplePie_Item->get_local_date( $date_format );
Supports any PHP date format from {@see} (empty for the raw data)
По умолчанию: '%c'

Список изменений

С версии 1.0 Введена.

Код SimplePie_Item::get_local_date() WP 6.0.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;