Displaying dates

Hi,

I have a database of events. I am able to display the date of the individual events in the fromat 04-05-2012. Please bear in mind that in Europe we put the day before the month so the date I have shown is : 4th May 2012.

I want to be abe to show the date in the format : Friday 4th May 2012.

I know there are formats for this but how do I incoporate them into my code below. I have tried a few ways but with no success. The date is output in the line in the code below

outputDate($event->startdate);

where outputDate is a seperate function which has the html layout.

I am a newbie.

Thanks in advance for any help.

[php]function showFrontPage ($numberofEvents,$category) {

if ($_SERVER[‘HTTP_HOST’] == “errisevents.com” ) {

define("IMAGE_URL",'http://home.eventmanager.com/');
$currentDate = date("y-m-d");
//$category = $_GET ['category'];
$feedURL = ("http://eventmanager.errisevents.com/get_events_rss.php?format=xml&fromDate=$currentDate&toDate=12-12-31&cat=$category&sort=asc");

}
else {
define(“IMAGE_URL”,‘http://eventmanager.errisevents.com/’);
$currentDate = date(“y-m-d”);
//$category = $_GET [‘category’];
$feedURL = (“http://eventmanager.errisevents.com/get_events_rss.php?format=xml&fromDate=$currentDate&toDate=12-12-31&cat=$category&sort=asc”);
}

$xml = simplexml_load_file($feedURL);

$totalEvents = sizeof($xml->eventitem);

//Need to check that numberofvents is less than total events so that's why we make  two checks

for($i=0; $i < $numberofEvents && $i < $totalEvents; $i++) {
	
	
	$event = $xml->eventitem[$i];

output_post ();

outputHeading ($event->title);

output_div_close ();
//blankLineEvent();

if (trim($event->imagefile) != ‘eventimages/’) { //Don’t output an image if blank
//printf(“ImageFile: %s
“,$event->imagefile);
printf(””,$event->imagefile);
}
blankLineEvent();
outputInfo($event->description);
displayEventTableHead ();
outputDate($event->startdate);
outputTime($event->starttime);
outputVenue($event->venue);
outputPrice($event->pricing);
outputEndTable();

}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service