Subscribe: cogdogblog: Feed2JS: A Few More Tweaks and WordPress Date Woes Comments and Trackbacks
http://cogdogblog.com/alan/archives/2004/06/02/feed2js.xml
Preview: cogdogblog: Feed2JS: A Few More Tweaks and WordPress Date Woes Comments and Trackbacks

cogdogblog: Feed2JS: A Few More Tweaks and WordPress Date Woes Comments and Trackbacks



Thanks for the comments that have helped identify some minor and not so minor issues with our new Feed to Javascript site. See below for updates! Some updates for folks that have implemented their own versions of this: A few...



Last Build Date: Fri, 07 Apr 2006 11:40:43 -0700

 



CDB Entry: Feed2JS: A Few More Tweaks and WordPress Date Woes

Wed, 02 Jun 2004 10:30:32 -0700

Thanks for the comments that have helped identify some minor and not so minor issues with our new Feed to Javascript site. See below for updates! Some updates for folks that have implemented their own versions of this: A few...



comment by: Dave Bauer

Wed, 02 Jun 2004 12:15:17 -0700

The RFC allows for a text timezone or offset


/ ( ("+" / "-") 4DIGIT ) ; Local differential
; hours+min. (HHMM)


The example you posted has +0000, an offet of 0 hours which is the same as GMT/UTC.




comment by: todd

Wed, 02 Jun 2004 13:07:57 -0700

I changed lines 193 and 194 to read

if ($date == 'y' and $item['pubdate']) {
$my_date = $item['pubdate'];

instead of using $item['dc']['date'] and it prints the date, but not in a pretty format. I'm not sure what to do to change the format but for now it's good'nuff. You also have to change line 197 to use $my_date instead of $pretty_date.

I'll play around with an if-elif statement of some sort, since my example would not read a dc:date field. I'm not a programmer so I'll see what other damage I can do.




comment by: Alan Levine

Wed, 02 Jun 2004 15:48:54 -0700

Thanks Dave- the WordPress date format should be legit.

Todd, I found that magpie can return the date iin two different array places, so the latest script now has two methods for formatting the date... it is possible that the magpie utility in utils_inc.php may need a tweak, but the new script works for your feeds now:

http://jade.mcli.dist.maricopa.edu/feed/index.php?s=build&src=http%3A%2F%2Fidea.matc.tec.oh.us%2Fidea.xml&chan=y&num=0&desc=1&date=y&targ=n&preview=Preview+the+Feed




comment by: todd

Thu, 03 Jun 2004 05:30:38 -0700

Thanks Alan, that's great!