SimplePie 1.3.1 is now available. Upgrade now!

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_local_date()



class SimplePie_Item {
	get_local_date ( [$date_format = '%c'] )

Returns the date/timestamp of the posting in the localized language. Date format supports anything that works with PHP's strftime() function. To display in other languages, you need to change the locale with PHP's setlocale() function. The available localizations depend on which ones are installed on your web server.


  • Available since SimplePie 1.0.



Accepts any value allowed by strftime().


Display the date

// Set the region/language to Canadian French
setlocale(LC_TIME, 'fr_CA');
$feed = new SimplePie();
foreach ($feed->get_items() as $item)
	echo $item->get_local_date('%A %e %B %Y');

See Also

reference/simplepie_item/get_local_date.txt · Last modified: 2011/03/05 19:56 (external edit)