“A thing of beauty”

Rob Ryan posed this problem:

I am beginning to understand some bits of this stuff, but not nearly enough, and so I bang my head against things until my head hurts and I go looking for help. This is one of those times.

I’m trying to use simpleXML to process a feed from uvmbored and put it on a web page.


My only real issue is with the date. Rather than printing something like
Mon, 05 Nov 2012 09:00:00 -0400

I’d prefer something more like

Monday, November 5 at 9:00 AMI suspect the PHP date_parse or date_parse_from_format function may be the ticket here, but I can’t get the syntax right (or something)–I’ve not had any luck. can you make some suggestions? 

My retort:

$test= new DateTime($date);
$mydate=$test->format("l, F j a\t g:i A");
print "$mydate: $title$descript n";

The trickiest bit was getting the ‘ at ‘

Rob’s response: “A thing of beauty; thanks.”

About Wesley Wright

Born on a mountain top near New York City, Craziest state in the land of the pretty. Raised in the woods so's he knew every tree, Killed him a bear when he was only three.
This entry was posted in Wes and tagged , . Bookmark the permalink.