cgm225 Posted July 8, 2007 Share Posted July 8, 2007 I am outputting RSS feed with a PHP script, but some of the dates/times are causing the feed to fail w3 validation (see: here). What is causing the problem? Thank you in advance! Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 8, 2007 Share Posted July 8, 2007 http://validator.w3.org/feed/docs/error/InvalidRFC2822Date.html I'd say you want to change the date format your php script generates so it matches the spec, i.e three-day month names Quote Link to comment Share on other sites More sharing options...
cgm225 Posted July 8, 2007 Author Share Posted July 8, 2007 Currently I am generating the date with:: $pubdate = date("D, d F Y H:i:s") . " GMT"; How can I make it so the output includes months abbreviated down to three letters (i.e. June would be Jun, July would be Jul, etc.)? Thank you in advance! Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 8, 2007 Share Posted July 8, 2007 date("M") generates the three character abbreviation. Just change F to M in your script line http://ca.php.net/manual/en/function.date.php Quote Link to comment Share on other sites More sharing options...
cgm225 Posted July 8, 2007 Author Share Posted July 8, 2007 Perfect Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.