{"id":805,"date":"2012-11-06T11:00:19","date_gmt":"2012-11-06T15:00:19","guid":{"rendered":"http:\/\/blog.uvm.edu\/ctl-projects\/?p=197"},"modified":"2012-11-06T11:00:19","modified_gmt":"2012-11-06T15:00:19","slug":"a-thing-of-beauty","status":"publish","type":"post","link":"https:\/\/blog.uvm.edu\/waw\/2012\/11\/06\/a-thing-of-beauty\/","title":{"rendered":"&#8220;A thing of beauty&#8221;"},"content":{"rendered":"<p>Rob Ryan posed this problem:<\/p>\n<blockquote><p><em>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.<\/em><\/p>\n<p><em>I&#8217;m trying to use simpleXML to process a feed from uvmbored and put it on a web page.<\/em><\/p>\n<p><em><a href=\"https:\/\/www.uvm.edu\/~chwb\/rsstest.php\">https:\/\/www.uvm.edu\/~chwb\/rsstest.php<\/a><\/em><\/p>\n<p><em>My only real issue is with the date. Rather than printing something like<\/em><br \/>\n<em>Mon, 05 Nov 2012 09:00:00 -0400<\/em><\/p>\n<p><em>I&#8217;d prefer something more like<\/em><\/p>\n<p><em>Monday, November 5 at 9:00 AM<\/em><em>I suspect the PHP date_parse or date_parse_from_format function may be the ticket here, but I can&#8217;t get the syntax right (or something)&#8211;I&#8217;ve not had any luck. can you make some suggestions?\u00a0<\/em><\/p><\/blockquote>\n<p>My retort:<\/p>\n<blockquote>\n<pre>$date=$item-&gt;pubDate;\n$test= new DateTime($date);\n$mydate=$test-&gt;format(\"l, F j a\\t g:i A\");\n$title=$item-&gt;title[0];\nprint \"$mydate: <a href=\"$url\">$title<\/a>$descript n\";<\/pre>\n<\/blockquote>\n<p>The trickiest bit was getting the &#8216; at &#8216;<\/p>\n<p>Rob&#8217;s response: &#8220;A thing of beauty; thanks.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/blog.uvm.edu\/waw\/2012\/11\/06\/a-thing-of-beauty\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41826],"tags":[42758,647],"class_list":["post-805","post","type-post","status-publish","format-standard","hentry","category-wes","tag-boffins","tag-php"],"_links":{"self":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/comments?post=805"}],"version-history":[{"count":0,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/805\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/media?parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/categories?post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/tags?post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}