SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie_Item » get_date()

get_date()

Description

class SimplePie_Item {
	get_date ( [$date_format = 'j F Y, g:i a'] )
}

Returns the date/timestamp of the posting. Date format supports anything that works with PHP's date() function. Only supports the English language.

Availability

  • Available since SimplePie Beta 2.
  • Previously existed as get_item_date() since SimplePie 0.8.

Parameters

date_format

Accepts any value allowed by date().

Examples

Display the date

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->init();
$feed->handle_content_type();
 
foreach ($feed->get_items() as $item)
{
	echo $item->get_date();
}

See Also


reference/simplepie_item/get_date.txt · Last modified: 2011/03/06 03:56 (external edit)